Skip to content

Commit

Permalink
Fixed #1175 - Gap fill drag drop marking incorrect on results page
Browse files Browse the repository at this point in the history
  • Loading branch information
torinfo committed Nov 22, 2022
1 parent 6606e6f commit 61ad7a4
Showing 1 changed file with 7 additions and 7 deletions.
Expand Up @@ -56,7 +56,7 @@
score = $pageContents.data('score');
attempts = $pageContents.data('attempts');

if (XTGetMode() == "normal") { this.isTracked = true; };
if (XTGetMode() == "normal") { this.isTracked = true; }

$pageContents.find("#hint").remove();
}
Expand Down Expand Up @@ -1173,20 +1173,20 @@
for (var interactionNumber = 0; interactionNumber < answerData.length; interactionNumber++) {
var correctAnswer = answerData[interactionNumber][0];
var labelSource = labelAnswers[correctAnswer];
var option = {source: labelSource, target: correctAnswer};
var option = {source: labelSource, target: interactionNumber};
l_options.push(option);
if (option.source == option.target) {
if (correctAnswer == labelSource) {
correct_answers++;
}

var l_answer = labelSource + "-->" + correctAnswer;
var l_answer = labelSource + "-->" + interactionNumber;
l_answers.push(l_answer);
total++;
}
var correct = (total == correct_answers);
var result = {
const correct = (total == correct_answers);
const result = {
success: correct,
score: (correct ? 100.0 : 0.0)
score: (correct_answers * 100.0)/total
};
if (!correct) { feedback = "Incorrect"; }

Expand Down

0 comments on commit 61ad7a4

Please sign in to comment.