Forum Discussion
Print Results - Change Student Score to Total Points Awarded
Hello! I built a quiz in SL3 - it has 25 questions and score is based on the answer selected (pt value is 1-5 per question). Max score is 125. The results slide is properly reflecting the total points awarded. When using the print results function, the student sore is 100. Presumably because I received 125 of 125, or 100%, of available points. Is there any way to swap out the Student Score for Total Points Awarded similar to the results slide?
I assume the print.html file is telling it what to read but I don't what to change, if I even can. I'm a code rookie but can follow directions pretty well. (Thank you to previous posts that tell me how to get rid of content I didn't want!)
Any direction or advice is greatly appreciated! TYIA!
14 Replies
- SamHillSuper Hero
Hi Tara, are you able to send me your file. I can see in the file report_html_text_file.txt that the points score is not currently defined, but it may be passed in to the file and we may be able to access it. I'll be able to let you know if I can run the file and query the data. If sensitive, you can pass to me privately, or post here removing any sensitive data.
- TaraDonahueCommunity Member
Hi Sam - thanks so much for offering to help! Russell's report file worked perfectly.
- RussellKillips-Community Member
Hello Tara,
Try this report file. After publishing your course, replace the report.html file (located in story_content folder) with this attached file.
Please note, that the score recorded in the LMS will still be a percent. So, if you get 125 points the LMS will still show 100%.
- TaraDonahueCommunity Member
Hey Russell, that worked perfectly - thank you so much!
- JohnCooper-be3cCommunity Member
Hi
Thanks Tara for raising this query - and thanks Russel for brilliantly fixing it. I also needed to do this.
Can I be cheeky - I know it's bad form for a magician to reveal their tricks - but what changes did you make, Russell, to Report,html?
- JohnCooper-be3cCommunity Member
Actually, I found the modifications Russell made to the displayCourseSummary function in report,html - excellent!! Superstar.
If I wanted to also change the next box along to show total points available - is there a variable I can use to also modify this field?
- RussellKillips-Community Member
Hello John,
Sorry, I don't see a variable to display the total points available.
I found an easier way to show the total points awarded instead of the percent score.
In the displayCourseSummary function change:
studentScore = Number(mainQuiz.nPtScore),
to:
studentScore = Number(mainQuiz.nScore),
- RussellKillips-Community Member
Because we changed the studentScore this way, it will also affect the Result. The result is based on the studentScore and passingScore.
courseResult = (studentScore >= passingScore) ? 'Pass' : 'Fail',
If you want the result to still be based on the previous score values you should be able to change it to:
courseResult = (Number(mainQuiz.nPtScore) >= Number(mainQuiz.nPassingScore)) ? 'Pass' : 'Fail',
- RussellKillips-Community Member
Let’s use some math to get total points possible.
Percent earned is nPtScore
Points earned is nScore
Total Possible Points =
100/Number(mainQuiz.nPtScore)*Number(mainQuiz.nScore)
- JohnCooper-be3cCommunity Member
Russell - sometimes genius is seeing what is staring us in the face and recognising its value. Of course I can calculate it!!
You would hardly think I used to teach mathematics...
Thank you so much for helping me with this.
- JohnCooper-be3cCommunity Member
By the way - that works - I now have the headers "Your Points Score" and "Maximum Points "in the Course Summary. The values are correct - and, thanks to your earlier formula, so is the Result (Pass/Fail).
You are brilliant!
- JohnCooper-be3cCommunity Member
Re my comment on genius - I should add (before someone else does) that stupidity is looking at something blindingly obvious and not seeing it!
Related Content
- 2 years ago
- 3 months ago