Forum Discussion
Affichage scores quiz dans le fichier report.html
Sophie,
Yes. This is possible but it will require that you utilize JavaScript and create some variables in Storyline. Here is Matthew Bibby's explanation.
I am not a Javascript person, so perhaps someone else will provide you with the best code to use. I did play around with this for a few minutes and was able to pull multiple quiz points and a global total by using multiple results slides and this JavaScript. I also created SL number variables (Results, Results1 and Results2) to equal the value of the built-in quiz variables (Results.ScorePoints, Results1.ScorePoints, and Results2.ScorePoints) and then used (Results, Results1 and Results2) in the script below.
I'm not sure if JavaScript can pull the built-in variables, perhaps Walt or Matthew Bibby can provide insight. But, from this article, https://community.articulate.com/discussions/articulate-storyline/can-javascript-access-built-in-variables I decided to use custom variables just in case.
Anyway, this may help you a little but it is possible to do this as you can see.
var myWindow = window.open("","Print","width=810,height=610,scrollbars=1,resizable=1");
var player=GetPlayer();
var GlobalResults=player.GetVar("GlobalResults");
var Results=player.GetVar("Results");
var Results1=player.GetVar("Results1");
var Results2=player.GetVar("Results2");
var contents = "<html><head></head><body style='width:650px;padding:20px;'>";
contents+="<div style='height:20px;padding:10px;margin-bottom:20px;text-align:center;'><button onclick='javascript:window.print();'>Print My Notes</button></div>";
contents+="<div style='font-size:18px;font-weight:bold;margin-top:10px;'>Here are your results.</div>";
contents+="<div style='font-size:17px;margin-top:5px;'>Global Score</div>";
contents+="<div style='font-size:17px;margin-top:5px;'>"+GlobalResults+"</div>";
contents+="<div style='font-size:17px;margin-top:5px;'>First Test Score</div>";
contents+="<div style='font-size:17px;margin-top:5px;'>"+Results+"</div>";
contents+="<div style='font-size:17px;margin-top:5px;'>Second Test Score</div>";
contents+="<div style='font-size:17px;margin-top:5px;'>"+Results1+"</div>";
contents+="<div style='font-size:17px;margin-top:5px;'>Third Test Score</div>";
contents+="<div style='font-size:17px;margin-top:5px;'>"+Results2+"</div>";
contents+= "</body></html>";
myWindow.document.write(contents);