Merged in ENCOA-139_ReleaseBug (pull request #87)
ENCOA-139 Release Improvements
This commit is contained in:
@@ -214,7 +214,7 @@ export default function ExamPage({page, user}: Props) {
|
||||
if (selectedModules.length > 0 && exams.length > 0 && moduleIndex < selectedModules.length) {
|
||||
const nextExam = exams[moduleIndex];
|
||||
|
||||
if (partIndex === -1 && nextExam.module !== "listening") setPartIndex(0);
|
||||
if (partIndex === -1 && nextExam?.module !== "listening") setPartIndex(0);
|
||||
if (exerciseIndex === -1 && !["reading", "listening"].includes(nextExam?.module)) setExerciseIndex(0);
|
||||
setExam(nextExam ? updateExamWithUserSolutions(nextExam) : undefined);
|
||||
}
|
||||
|
||||
@@ -123,6 +123,7 @@ async function POST(req: NextApiRequest, res: NextApiResponse) {
|
||||
endDate: string;
|
||||
variant?: Variant;
|
||||
instructorGender?: InstructorGender;
|
||||
released: boolean;
|
||||
};
|
||||
|
||||
const exams: ExamWithUser[] = !!examIDs
|
||||
@@ -140,7 +141,6 @@ async function POST(req: NextApiRequest, res: NextApiResponse) {
|
||||
results: [],
|
||||
exams,
|
||||
instructorGender,
|
||||
released: false,
|
||||
...body,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user