From 4a89d8f6d676cf216a4365cded1f4217d28a1292 Mon Sep 17 00:00:00 2001 From: Jacob Pierce Date: Mon, 26 Aug 2024 13:18:17 -0700 Subject: [PATCH] quizsummarypage fetch quiz in created, not route hook --- .../assets/src/views/plan/QuizSummaryPage/index.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kolibri/plugins/coach/assets/src/views/plan/QuizSummaryPage/index.vue b/kolibri/plugins/coach/assets/src/views/plan/QuizSummaryPage/index.vue index dc4d17d4eb0..94f3be4f4ff 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/QuizSummaryPage/index.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/QuizSummaryPage/index.vue @@ -149,13 +149,13 @@ return this.$route.params.classId; }, }, - beforeRouteEnter(to, from, next) { - return fetchQuizSummaryPageData(to.params.quizId) + created() { + return fetchQuizSummaryPageData(this.$route.params.quizId) .then(data => { - next(vm => vm.setData(data)); + this.setData(data); }) .catch(error => { - next(vm => vm.setError(error)); + this.setError(error); }); }, methods: { @@ -240,7 +240,7 @@ }); }, handleSubmitDelete() { - return deleteExam(this.quiz.id) + return deleteExam(this.$route.params.quizId) .then(() => { this.$store.commit('classSummary/DELETE_ITEM', { map: 'examMap', id: this.quiz.id }); this.$router.replace(this.$router.getRoute('EXAMS'), () => {