Editing report.html

Apr 10, 2022

Hi There

Apologies in advance.

I know editing report.html is still (still?) unsupported after many years of requests, but would really appreciate assistance from the community if possible.

We have about 30 eLearning modules for a major project and each module may contain several sections, with a quiz at the end of each section.

The report.html file separates the 3 quizzes into tables on the report so that learners can see the right and wrong answers. However, the 3 results tables on the report have the main module title not the section title which is in 3 project variables: Section_1_Title, Section_2_Title etc.

I have tried the get the sample code (below) adapted to our variables to work in our report but have been unable to so far:

Sample

var player=window.opener.GetPlayer();
var learnerID=player.GetVar("TextEntry").replace(/(\r\n|\r|\n)/g, '
');
document.write("

USER ID: "+learnerID+""); 
 
Adapted
 

var player=window.opener.GetPlayer();
var Section1=player.GetVar("Section_1_Title").replace(/(\r\n|\r|\n)/g, '
');
document.write("

USER ID: "+Section1+""); 
 

I have attached the report.html (renamed for attachment to report test) and a screenshot of the results showing the same heading for each of the section results tables. 

I would be grateful If anyone is able to assist, e.g. the exact code if the above is not right anymore and where to insert in the report as the results disappear when I attempt this with no JS knowledge.  

Regards Kris.

Be the first to reply