Skip to content

Commit

Permalink
Merge pull request #12352 from rtibbles/channelling_one_at_a_time
Browse files Browse the repository at this point in the history
Link to new quiz creation properly.
  • Loading branch information
marcellamaki authored Jun 27, 2024
2 parents a06464b + 71004eb commit 450e06a
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,10 @@
return this.quizzes;
},
newExamRoute() {
return { name: PageNames.EXAM_CREATION_ROOT, params: { sectionIndex: 0 } };
return {
name: PageNames.EXAM_CREATION_ROOT,
params: { classId: this.$route.params.classId, sectionIndex: 0, quizId: 'new' },
};
},
dropdownOptions() {
return [
Expand Down Expand Up @@ -392,14 +395,12 @@
});
},
handleSelect({ value }) {
const nextRoute = this.newExamRoute;
const nextRouteName = {
MAKE_NEW_QUIZ: PageNames.EXAM_CREATION_ROOT,
SELECT_QUIZ: PageNames.QUIZ_SELECT_PRACTICE_QUIZ,
}[value];
const nextRoute = {
name: nextRouteName,
params: { ...this.$route.params, quizId: 'new', sectionIndex: 0 },
};
nextRoute.name = nextRouteName;
this.$router.push(nextRoute);
},
},
Expand Down

0 comments on commit 450e06a

Please sign in to comment.