Skip to content

Commit

Permalink
Fix counts based on sessions and not all attempts within sessions
Browse files Browse the repository at this point in the history
 - Is an options. default is to use all attempts
  • Loading branch information
torinfo committed Apr 24, 2024
1 parent c619416 commit 4f5bbba
Showing 1 changed file with 13 additions and 8 deletions.
Expand Up @@ -770,7 +770,6 @@
statements.push(bestAttempt)
}
}
debugger
return statements
}

Expand Down Expand Up @@ -876,6 +875,16 @@
url = data[0].object.id;
}
interaction = $(x_currentPageXML).children()[interactionIndex];
var sessionStatementUsed = interaction.getAttribute("sessionStatementUsed");
if (sessionStatementUsed == undefined) {
sessionStatementUsed = "all";
}
debugger;
// You can only do this if you have a very targeted query
// If type is grouping, groupings or opinionclasses, we should NOT filter the data on sessions
if (type != "grouping" && type != "groupings" && type != "opinionclasses") {
data = filterRelevantStatements(data, sessionStatementUsed);
}
if (
data.length >= 1 &&
(retrieveAll || filterOwnStatements(data, xertelo).length >= 1)
Expand Down Expand Up @@ -1637,11 +1646,7 @@
var xertelo = interaction.getAttribute("xertelo");
var ownstatements = filterOwnStatements(data, xertelo);

var graphAnswerType = interaction.getAttribute("graphAnswerType");
if (graphAnswerType == undefined) {
graphAnswerType = "all";
}
var statements = filterRelevantStatements(data, graphAnswerType);

xerteurl = interaction.getAttribute("xerteurl");
xertelabel = interaction.getAttribute("label");
name = interaction.getAttribute("name");
Expand Down Expand Up @@ -1691,7 +1696,7 @@
barColors[i] = interaction.childNodes[i].getAttribute("blockColor").replace("0x","#");
}
}

var statements = data;
if (statements.length > 0) {
if (statements[0].extensions !== undefined) {
let numQuestions =
Expand Down Expand Up @@ -1872,7 +1877,7 @@
blockName = block.getAttribute("conScoreBetween")
}

if (score >= lowerBound && score <= upperBound) {
if (score >= lowerBound && score < upperBound) {
$("#" + escapeUrl(url, type, interactionIndex) + " .message").prepend('<button type="button" class="feedback">' + blockName + '</button>\n' +
'<div class="collapsibleContent block' + blockIndex + '" style="display: block; margin-bottom: 25px">' + block.getAttribute("adaptiveContent") + '</div>');
} else if (showOtherBlockContent == 'true'){
Expand Down

0 comments on commit 4f5bbba

Please sign in to comment.