Forum Discussion
Print Results - Change Student Score to Total Points Awarded
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),
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',
- JohnCooper-be3c5 years agoCommunity Member
Russell, many, many thanks.
The tip about mainQuiz.nScore is great!
I think the frustrating thing is that I have the information I need in the variables Results.ScorePoints and Results.PassPoints
I was thinking another approach might be to remove the Course Summary entirely from report.html and use JavaScript to pass those variables over and create my own Course Summary in html...
Not for the faint-hearted, though. I'm not sure my html is good enough.
The other possibility is that, in my case, every question is worth 5 points - so if I know the number of questions then I know the maximum points score - I'm sure I saw a variable in report,html that was the number of questions - or did I just make that up?? I've been looking at so much code recently...
- JohnCooper-be3c5 years agoCommunity Member
I'm thinking that it would be really fantastic if Articulate published the content and id's of the data arrays that are loaded by the html in report.html - or at least a table of some of the useful fields.
Related Content
- 2 years ago
- 3 months ago