Sending a results email

I am trying to have the user send an email of their results from the results page.  I made a SendEmail variable and added a JavaScript trigger with the following code.

var player = GetPlayer();

var email=player.GetVar("EmailAddress");

var subject="Quiz Results";

var body_start="Here are my results!"

var score = player.GetVar("Results.ScorePoints");

var mailto_link='mailto:'+email+'?subject='+subject+'&body='+body_start+score;

win=window.open(mailto_link,'emailWin');

So when I publish it and click on the link "Email Results" nothing happens.

If I take out line 5 and take out +score on line 6 it works but all it says is "Here are my results!"

My guess is that the data from Results.ScorePoints is not being pulled over to the email which is not even letting me open up the link for the email. 

Any ideas on how to fix this?

Thanks!

Mike

2 Replies
Christie Pollick

Hi, Mike -- As outlined here, "we want every feature in our software to work well. Unfortunately, there’s no way to email quiz results easily, accurately, and consistently. For example, if you use Gmail or your computer’s security settings are high, you can’t email results. Also, you run the risk of learners tampering with results since they can access the email before it’s sent. Given these limitations, we decided not to include the email results feature in new products."

And as I see that you are interested in using JavaScript to accomplish what you have in mind, I thought I should stop in to note for anyone who is considering using JS as an option, unfortunately, we are not able to provide support for JavaScript coding. Luckily, we have lots of community members who are more than willing to share their expertise to assist!

And for those who'd like to review it, here is a sheet on JavaScript Best Practices you may want to keep handy. :)