Skip to content

Commit

Permalink
Merge pull request #12436 from AlexVelezLl/fix-quiz-preview
Browse files Browse the repository at this point in the history
Fix quiz preview
  • Loading branch information
marcellamaki authored Jul 11, 2024
2 parents 671cf92 + 2c33f50 commit 913ad65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion kolibri/core/assets/src/exams/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export function getExamReport(examId, tryIndex = 0, questionNumber = 0, interact
});
}

export function annotateSections(sections, questions) {
export function annotateSections(sections, questions = []) {
// Adding the additional startQuestionNumber and endQuestionNumber fields to each section
// allows to more easily identify the overall place in the quiz that a question is.
// This is useful for deciding which section is currently active based on the global
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</p>

<QuestionListPreview
:selectedQuestions="selectedQuestions"
:sections="quiz.question_sources || []"
:selectedExercises="selectedExercises"
/>
</KPageContainer>
Expand Down Expand Up @@ -66,12 +66,6 @@
};
},
computed: {
selectedQuestions() {
return this.quiz.question_sources.reduce((acc, section) => {
acc = [...acc, ...section.questions];
return acc;
}, []);
},
quizIsRandomized() {
return !this.quiz.learners_see_fixed_order;
},
Expand Down

0 comments on commit 913ad65

Please sign in to comment.