Skip to content

Commit

Permalink
Merge pull request #4186 from rtibbles/no_null_answer
Browse files Browse the repository at this point in the history
Allow empty answers to persist in exams
  • Loading branch information
rtibbles authored Aug 23, 2018
2 parents 1d39ae8 + 0cca36a commit d538976
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions kolibri/plugins/learn/assets/src/views/exam-page/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,8 @@
return this._throttledSaveAnswer(...args);
},
saveAnswer() {
const answer = this.checkAnswer() || {
answerState: null,
simpleAnswer: '',
correct: 0,
};
if (!isEqual(answer.answerState, this.currentAttempt.answer)) {
const answer = this.checkAnswer();
if (answer && !isEqual(answer.answerState, this.currentAttempt.answer)) {
const attempt = Object.assign({}, this.currentAttempt);
attempt.answer = answer.answerState;
attempt.simple_answer = answer.simpleAnswer;
Expand Down

0 comments on commit d538976

Please sign in to comment.