Enabled a way for students to do assigned tasks
This commit is contained in:
@@ -41,6 +41,7 @@ export default function ExamPage({page}: Props) {
|
||||
const [userSolutions, setUserSolutions] = useExamStore((state) => [state.userSolutions, state.setUserSolutions]);
|
||||
const [showSolutions, setShowSolutions] = useExamStore((state) => [state.showSolutions, state.setShowSolutions]);
|
||||
const [selectedModules, setSelectedModules] = useExamStore((state) => [state.selectedModules, state.setSelectedModules]);
|
||||
const assignment = useExamStore((state) => state.assignment);
|
||||
|
||||
const {user} = useUser({redirectTo: "/login"});
|
||||
const router = useRouter();
|
||||
@@ -98,6 +99,7 @@ export default function ExamPage({page}: Props) {
|
||||
module: solution.module!,
|
||||
user: user?.id || "",
|
||||
date: new Date().getTime(),
|
||||
...(assignment ? {assignment: assignment.id} : {}),
|
||||
}));
|
||||
|
||||
axios
|
||||
|
||||
Reference in New Issue
Block a user