Skip to content

Commit

Permalink
Merge pull request #4713 from rtibbles/exam_update
Browse files Browse the repository at this point in the history
Don't give misleading message to learners on exam submission.
  • Loading branch information
rtibbles authored Jan 11, 2019
2 parents 3419aa3 + 11bc500 commit f33f32b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion kolibri/plugins/learn/assets/src/views/ExamPage/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@
return Promise.resolve();
},
goToQuestion(questionNumber) {
this.saveAnswer(true).then(() => {
const promise = this.debouncedSetAndSaveCurrentExamAttemptLog.flush() || Promise.resolve();
promise.then(() => {
this.$router.push({
name: ClassesPageNames.EXAM_VIEWER,
params: {
Expand All @@ -230,6 +231,15 @@
});
},
toggleModal() {
// Flush any existing save event to ensure
// that the subit modal contains the latest state
if (!this.submitModalOpen) {
const promise =
this.debouncedSetAndSaveCurrentExamAttemptLog.flush() || Promise.resolve();
return promise.then(() => {
this.submitModalOpen = !this.submitModalOpen;
});
}
this.submitModalOpen = !this.submitModalOpen;
},
finishExam() {
Expand Down

0 comments on commit f33f32b

Please sign in to comment.