Added the same functionality to the Assignments

This commit is contained in:
Tiago Ribeiro
2024-02-09 13:23:35 +00:00
parent 872cc62fe4
commit 03f78ceb46
3 changed files with 23 additions and 3 deletions

View File

@@ -86,7 +86,7 @@ const generateExams = async (
}
const selectedModulePromises = selectedModules.map(async (module: Module) => {
const exams: Exam[] = await getExams(db, module, "false", undefined);
const exams: Exam[] = await getExams(db, module, "false", undefined, variant, instructorGender);
const exam = exams[getRandomIndex(exams)];
if (exam) {
@@ -133,6 +133,7 @@ async function POST(req: NextApiRequest, res: NextApiResponse) {
assignees,
results: [],
exams,
instructorGender,
...body,
});