diff --git a/src/dashboards/Student.tsx b/src/dashboards/Student.tsx index d93a0780..ec67cff7 100644 --- a/src/dashboards/Student.tsx +++ b/src/dashboards/Student.tsx @@ -38,7 +38,7 @@ export default function StudentDashboard({user}: Props) { const setAssignment = useExamStore((state) => state.setAssignment); const startAssignment = (assignment: Assignment) => { - const examPromises = assignment.exams.map((e) => getExamById(e.module, e.id)); + const examPromises = assignment.exams.filter((e) => e.assignee === user.id).map((e) => getExamById(e.module, e.id)); Promise.all(examPromises).then((exams) => { if (exams.every((x) => !!x)) { @@ -121,6 +121,7 @@ export default function StudentDashboard({user}: Props) {