From 2470b83a6dda93ea75414f2ce2e09889b4afe830 Mon Sep 17 00:00:00 2001 From: Christopher Fullarton <trayhem@gmail.com> Date: Tue, 14 Feb 2017 16:10:38 +0100 Subject: [PATCH] Add questionIndex to the correctAnswer query in the question and answer dialog window --- arsnova.click/client/plugins/splashscreen/scripts/lib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arsnova.click/client/plugins/splashscreen/scripts/lib.js b/arsnova.click/client/plugins/splashscreen/scripts/lib.js index e9e2753b0..f518de43e 100644 --- a/arsnova.click/client/plugins/splashscreen/scripts/lib.js +++ b/arsnova.click/client/plugins/splashscreen/scripts/lib.js @@ -305,7 +305,7 @@ export const parseMarkdown = { return result; }, isCorrectAnswer: function (answerindex) { - return AnswerOptionCollection.findOne({answerOptionNumber: answerindex}).isCorrect; + return AnswerOptionCollection.findOne({answerOptionNumber: answerindex, questionIndex: Template.instance().data.questionIndex}).isCorrect; }, isVideoQuestionText: function (questionText) { return !/(^!)?\[.*\]\(.*\)/.test(questionText) && /((https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?)/.test(questionText) && (/youtube/.test(questionText) || /youtu.be/.test(questionText) || /vimeo/.test(questionText)); -- GitLab