From 4998b30a85657850869f3c31872e15e1f08b6534 Mon Sep 17 00:00:00 2001 From: Alex Velez Date: Mon, 14 Oct 2024 11:53:42 -0500 Subject: [PATCH] Requested changes --- .../coach/assets/src/views/plan/QuizSummaryPage/api.js | 9 ++++----- .../assets/src/views/plan/QuizSummaryPage/index.vue | 4 +++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/kolibri/plugins/coach/assets/src/views/plan/QuizSummaryPage/api.js b/kolibri/plugins/coach/assets/src/views/plan/QuizSummaryPage/api.js index 39378bab9d9..0351b8195cf 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/QuizSummaryPage/api.js +++ b/kolibri/plugins/coach/assets/src/views/plan/QuizSummaryPage/api.js @@ -14,11 +14,10 @@ const fetchDifficultQuestions = async exam => { true, ); - const allQuestions = exam.question_sources.reduce((qs, section) => { - qs = [...qs, ...section.questions]; - - return qs; - }, []); + const allQuestions = exam.question_sources.reduce( + (qs, section) => [...qs, ...section.questions], + [], + ); allQuestions.forEach(question => { const questionStats = correctnessStats.find(stat => stat.item === question.item); 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 0f6b306355c..87fdc014611 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/QuizSummaryPage/index.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/QuizSummaryPage/index.vue @@ -344,7 +344,9 @@ }); }, exportCSV() { - this.$refs.table.exportCSV?.(); + if (typeof this.$refs.table.exportCSV === 'function') { + this.$refs.table.exportCSV(); + } }, }, $trs: {