Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
LeavePage bugs fixed in Timeline + Matching texts
  • Loading branch information
jorisburgers committed Jun 21, 2016
1 parent b91f6f2 commit a026e1d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
Expand Up @@ -366,7 +366,15 @@
var $this = $(this);
l_total++;
var l_option={};
var l_placeholder = $this.data("currentTarget").text().trim();
var l_placeholder, l_draglabel

if($this.data("currentTarget") != "" && $this.data("currentTarget").text() != undefined)
{
l_placeholder = $this.data("currentTarget").text().trim();

}else{
l_placeholder = "";
}
var l_draglabel = $this.find("div").text().trim();
l_option.source = l_draglabel;
l_option.target = l_placeholder;
Expand Down
Expand Up @@ -26,7 +26,8 @@
labelTxt3,
targetTxt1,
targetTxt2,
$feedback;
$feedback,
tracked = false;

// function called every time the page is viewed after it has initially loaded
this.pageChanged = function() {
Expand Down Expand Up @@ -284,8 +285,17 @@
var $this = $(this);

var tData = $this.data("currentTarget");
var l_placeholder = tData.text().trim();
var l_placeholder;
if(tData != "")
{
l_placeholder = tData.text().trim();
}else{
l_placeholder = "";
}


var l_draglabel = $this.text().trim();

l_options = [];
option = {source:l_draglabel, target:l_placeholder};
l_answer = l_draglabel + "-->" + l_placeholder;
Expand All @@ -295,8 +305,8 @@
l_correct++;
correct = true;
}
debugger;
XTExitInteraction(x_currentPage, tData.data("id"), correct, l_options, l_answer, $("#feedback").text());

XTExitInteraction(x_currentPage, $this.data("target").data("id"), correct, l_options, l_answer, $("#feedback").text());
l_total++;
});

Expand Down Expand Up @@ -331,7 +341,6 @@
correctOptions.push(correctOption);
correctAnswer = draglabel + "-->" + placeholder;
XTEnterInteraction(x_currentPage, i, 'match', placeholder, correctOptions, correctAnswer, "Correct");
debugger;
}
);

Expand Down

0 comments on commit a026e1d

Please sign in to comment.