Skip to content

Commit

Permalink
fixed bugs X of Y
Browse files Browse the repository at this point in the history
fixed the Attempts
  • Loading branch information
Mustafa Safi committed Aug 11, 2020
1 parent 60b7d43 commit 7052e78
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions modules/xerte/parent_templates/Nottingham/models_html5/topXQ.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,13 +369,11 @@
var $optionHolder = $("#OptionHolder");

var $attempts = $("#attempts");
var attempt = x_currentPageXML.getAttribute("Attempts");
if(attempt === null){
attempt = 1;
}
debugger;
var amountofTries = x_currentPageXML.getAttribute("amountOfTries");
$attempts.html(x_currentPageXML.getAttribute("attemptLabel")+ ": "+ attempt);
if(amountofTries=== null){
amountofTries =1;
}
$attempts.html(x_currentPageXML.getAttribute("attemptLabel")+ ": "+ amountofTries);

var elements = [];
$(x_currentPageXML).children().each(function (i) {
Expand Down Expand Up @@ -466,10 +464,9 @@


var tries = parseInt(x_currentPageXML.getAttribute("amountOfTries"));
debugger
attempt -= 1;
if(attempt > 0) {
$attempts.html(x_currentPageXML.getAttribute("attemptLabel")+ ": "+ attempt);
amountofTries -= 1;
if(amountofTries > 0) {
$attempts.html(x_currentPageXML.getAttribute("attemptLabel")+ ": "+ amountofTries);
}else{
$attempts.html("");
}
Expand Down

0 comments on commit 7052e78

Please sign in to comment.