Sending a completion email to the trainer with results.


after looking for the solution to this problem, finally, it as been solved.

I couldnt use the send email embedded function in storyline because the trainers changes. So that info needed to be in a variable.

Also i wanted each result slide reported to the trainer individually.  It has been solved as well. Well JS doesn't like variables with dots in them does it? I had to change the name of all the scores inside storyline.

var player = GetPlayer();

var adresseCourriel=player.GetVar("emailFormateur");
var sujetCourriel="résultat de questionnaire souterrain";

var ligne1 = player.GetVar("nomapprenant") + " a obtenu une note de: " + player.GetVar("noteTotale") + " dans le questionnaire.";

var ligne2 =" <BR> Il/elle a obtenu une note de " + player.GetVar("ns1") + " à la première section.";

var ligne3 = "Il/elle a obtenu la note de " + player.GetVar("ns2") + " à la deuxième section.";

var ligne4a = "Il/elle a obtenu la note de " + player.GetVar("ns3") +  " à la troisième section.";

var ligne4b =  "Et il/elle a obtenu la note de " + player.GetVar("ns4")  + " à la quatrième section.";

var corpsCourriel = ligne1 +  ligne2 + ligne3 + ligne4a + ligne4b;
var lienCourriel='mailto:'+adresseCourriel+'?subject='+sujetCourriel+'&body='+corpsCourriel;,'emailwin');

I now have 2 little problems left.

1- Language. Since i work in french, i have to deal with accents. When the text is sent to outlook, it changes every letter that is modified with a diacretic (ex ' résultat, première). We tried unicode, octal, HTML, ascii, none will work.

Does anyone know how to solve this?

2- Line breaks. i'd like the body of the text in the email to be on several lines, but \r\n doesnt seem to work in a string to be copied in outlook. and <BR> or <P> isn't understood as code.  Anyone got an idea on how to force a change of line after each statement??


I realize that the learner could change the content of the email. That why he's not sending it. The trainer is. The button that gives access to the send email function is locked and pnly the trainer can unlock it. With leads me with a final question :


A report can be printed from storyline with the result of each question. That is exactly what we want. You guys have no idea how lame the report from out LMS is - SAP LSO :(

I mean the report could easily go around the earth twice, and all we want is what is in the report.html file that is generated when we give access to printing.

the 1000$ question?  Is there a away to send this report as an attachment (with the learner's results in it, of course.) 


Be the first to reply