From: Benjamin Auder Date: Mon, 5 Feb 2018 14:10:37 +0000 (+0100) Subject: Bugs fixes X-Git-Url: https://git.auder.net/doc/html/DESCRIPTION?a=commitdiff_plain;h=3b8117c51c644b050b87811f1a923f6b7e5b7916;p=qomet.git Bugs fixes --- diff --git a/TODO b/TODO index 73f669e..2c7a5b2 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,3 @@ -Debug exam mode (and open too...): Vue.js warning + shift questions (not showing solution) - Replace underscore by lodash (or better: ES6) Replace socket.io by Websockets ( https://www.npmjs.com/package/websocket ) diff --git a/public/javascripts/assessment.js b/public/javascripts/assessment.js index 09caf12..9858643 100644 --- a/public/javascripts/assessment.js +++ b/public/javascripts/assessment.js @@ -129,7 +129,8 @@ let V = new Vue({ this.answers.indices = indices.concat( _.shuffle(remainingIndices) ); } this.answers.index = !!paper ? paper.inputs.length : 0; - Vue.nextTick(statementsLibsRefresh); + this.answers.displayAll = assessment.display == "all"; + this.answers.showSolution = false; this.stage = 2; }; if (assessment.mode == "open") @@ -223,6 +224,7 @@ let V = new Vue({ if (assessment.mode == "open") { this.stage = 4; + this.answers.showSolution = true; return; } $.ajax("/end/assessment", { @@ -248,6 +250,7 @@ let V = new Vue({ setAnswers: function(m) { for (let i=0; i 0 - .card(v-if="stage==2") + .card(v-show="stage==2") .timer.center {{ countdown }} .card - button#sendAnswer.waves-effect.waves-light.btn(@click="sendAnswer") Send + button.sendAnswer.waves-effect.waves-light.btn(@click="sendAnswer") Send statements(:questions="assessment.questions" :answers="answers") + if assessment.display == "all" + button.sendAnswer.waves-effect.waves-light.btn(@click="sendAnswer") Send #stage3(v-show="stage==3") .card .finish Exam completed ☺ ...don't close the window!