Forum Discussion
Report.html
Hey all,
I have a variable in my exam "Attempts" that show how many attempts a user took to pass the exam.
I was wondering if we could create an entry on the report that I can feed this variable into so that the final report shows the attempts.
Also - does the edited report.html work on HTML5 yet? While researching, I saw a thread from 6 years ago where the report didn't work in HTML5 and only Flash.
Hello Adam,
Happy to help!
There isn't a built-in way to send the value of a custom variable to the report.html file, but members of the community have found a way to do this using Javascript. While we don't support Javascript, you can check out their solutions here:
- Setting a variable in the story.html file
- Add variable to report.html and new row per selection
- Place variables into the report.html file
As for the report.html file, I can confirm that it is written in HTML5, which is the standard that most websites use today.
Hope this helps!
- AdamHaner-18eecCommunity Member
Awesome. Thanks Joe!!
- RussellKillips-Community Member
Hi Adam,
Here's what I came up with.
I added in an attempts column next to the passing score.
In order to do that, I edited the displayCourseSummary() function inside of the report.html file.
Lines 161 and 162 is where the Attempts variable is retrieved.
Line 182 creates a title for the column.
Line 194 adds in the attempt value.
I have attached a sample storyline file and report file for you to take a look at.
And here's a link to the published output:
http://www.knowledgeconstruction.com/storyline_attempts/story.html
And here's a picture of the report.