Cleared of the stuff the EnCoach team wanted changed
This commit is contained in:
@@ -195,7 +195,7 @@ export default function AssignmentView({user, users, entity, assignment}: Props)
|
||||
.sort(sortByModule)
|
||||
.map((x) => x!.module),
|
||||
);
|
||||
router.push("/exercises");
|
||||
router.push("/exam");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -76,7 +76,7 @@ export default function AssignmentsPage({assignment, user, users, entities, grou
|
||||
const [selectedModules, setSelectedModules] = useState<Module[]>(assignment.exams.map((e) => e.module));
|
||||
const [assignees, setAssignees] = useState<string[]>(assignment.assignees);
|
||||
const [teachers, setTeachers] = useState<string[]>(assignment.teachers || []);
|
||||
const [entity, setEntity] = useState<string | undefined>(entities[0]?.id);
|
||||
const [entity, setEntity] = useState<string | undefined>(assignment.entity || entities[0]?.id);
|
||||
const [name, setName] = useState(assignment.name);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ export default function AssignmentsPage({assignments, corporateAssignments, enti
|
||||
{...a}
|
||||
users={users}
|
||||
onClick={
|
||||
entitiesAllowEdit.length > 0
|
||||
mapBy(entitiesAllowEdit, 'id').includes(a.entity || "")
|
||||
? () => router.push(`/assignments/creator/${a.id}`)
|
||||
: undefined
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user