I have two quizzes and two report slides for each quiz, in my project.
But ActivePresenter is combining the results of two separate quizzes in the second report. For example if the user gets 2 correct answers at the first quiz and 3 correct at the second, the second report shows 5 correct answers.
How can I split the results?
You can add the following JavaScript codes to the Report Slide’s On Load event > Execute JavaScript action:
// show row from minRow to maxRow (minRow, maxRow: 1-based row index)
var minRow = 3;
var maxRow = 5;
// to 0-based index
--minRow;
--maxRow;
var rows = $('table', this.node)[0].tBodies[0].rows;
for (var i = 0; i < rows.length; ++i) {
if (i < minRow || i > maxRow)
$(rows[i]).hide();
else // change No. column value
rows[i].cells[0].innerText = i - minRow + 1;
}
Ensure you update the minRow, maxRow value corresponding to your project to make it work.
For example, the report shows 10 questions, index will be from 1 to 10.
If you split into two parts, 1 to 4 and 5 to 10, the min/max value for the two parts will be 1/4 and 5/10, in turn.