Skip to content

Commit

Permalink
#1132 Fix Sortable Grid page bug where labels with same text on didn'…
Browse files Browse the repository at this point in the history
…t mark as correct when in 'wrong' cell after the answers had previously been checked at least once
  • Loading branch information
FayCross committed Mar 8, 2023
1 parent d71239a commit f6c7135
Showing 1 changed file with 2 additions and 3 deletions.
Expand Up @@ -277,7 +277,7 @@
var yPos = (Math.floor($this.index() / columnLength)) + 1;
l_answer = ($this.text().trim() + " --> [" + yPos + "," + xPos + "]");
l_option = {source: $this.text().trim(),target: "[" + xPos + "," + yPos + "]"};

if ($this.data("correct") == $this.index() || labelData[$("#grid .listHolder").index($this.parents(".listHolder"))][$this.index()] == $this.html()) {
$this.append('<span class="tick"><span class="ui-helper-hidden-accessible">' + x_getLangInfo(x_languageData.find("tick")[0], "label", "Correct") + '</span><span class="result fa fa-fw fa-x-tick"></span></span>');
numOfQuestions++;
Expand Down Expand Up @@ -654,7 +654,6 @@
}

} else {
debugger;
$holder = $('<div class="listHolder"></div>').appendTo($grid);
$ul = $('<ul/>').appendTo($holder);
labelData.push([]);
Expand Down Expand Up @@ -841,7 +840,7 @@
.removeClass("shadow")
.addClass("panel");

$grid.find(".tick").hide();
$grid.find(".tick").remove();
},
stop: function() {
$(this)
Expand Down

0 comments on commit f6c7135

Please sign in to comment.