Problem:
Is there a way to edit the reports slide? I would like to take off the learner response column in the “detailed results” portion of the data collection
ActivePresenter Version:
OS:
Notes:
Problem:
Is there a way to edit the reports slide? I would like to take off the learner response column in the “detailed results” portion of the data collection
ActivePresenter Version:
OS:
Notes:
Hi,
You can hide the “Learner Response” column by using JavaScript. Please follow the below steps:
if (!prez.initDetailReport) {
prez.initDetailReport = true;
var oldDetailedReportData = prez.detailedReportData;
prez.detailedReportData = function(bIncludeCorrectResponses) {
var data = oldDetailedReportData.call(this, bIncludeCorrectResponses);
data = data.replace(/(<th width='30%' align='center'>Learner Response<\/th>)/g, "");
data = data.replace(/(<td align='center' class='ap-result-response' style='word-break:break-all'>.*?<\/td>)/g, "");
return data;
}
}
Regards,
Thank you so much that worked perfectly. One more questions. Would it be the same code if I wanted to manipulate different elements. For example removing the ID and NO. columns or maybe the max score as well. Could I just substitute the new column name in. For example the code says
.>Learner Response</th>)/ could I just change it to .>Max Score</th>)/
Hi,
You can remove other columns by replacing the report data string. However, it requires more complex and hardcode. Therefore, you should not use this way.
Regards,
Hi all,
To hide the specific columns in the report table, you can add the following JavaScript codes to the Report Slide’s On Load event > Execute JavaScript action:
var columns = [3, 8]; // column index
for (var i = 0; i < columns.length; ++i) {
$('table th:nth-child(' + columns[i] + ')', this.node).hide();
$('table td:nth-child(' + columns[i] + ')', this.node).hide();
}
Then, edit the value of the var columns in the scripts. Enter the correct column number you want to hide.
For example, the above code demonstrates how to hide columns 3 and 8.
Hope it helps.
var columns = [3, 8]; //column index
for (var i = 0; i < columns.length; ++i) {
$(‘table th:nth-child(’ + columns[i] + ‘)’, this.node).hide();
$(‘table td:nth-child(’ + columns[i] + ‘)’, this.node).hide();
}
I can hide the columns I want with this code. But what I want, for example, is to see whether the 5th question is true or false, using javascript. I would be very happy if you could help me write the code that tells me whether the question I want is true or false, one by one. Kind regards
We do not support coloring the question result in the report table. So, if you want to see whether the question is true or false, just base on the Result column.
BR,