Skip to content

Commit

Permalink
Link to new quiz creation properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtibbles committed Jun 24, 2024
1 parent 5cd1f6a commit 71004eb
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 71004eb

Please sign in to comment.