E-mailing Test Results - Variables

Jun 08, 2012

During the Storyline beta testing, Steve Flowers posted a variable formula for e-mailing test results. I have tried the variable that he posted several times with no success. I'm just wondering if someone could post exactly how the variable would look with the e-mail address inserted.

Unfortunately, I can't quite figure out what I am doing wrong. Any help in regards to this matter would be greatly appreciated.

Thank you

10 Replies
Steve Flowers

Hey, Frank - 

Just want to make sure you're deploying this from a desktop using the Flash based output. The iOS player doesn't support JavaScript and HTML5 support of custom JavaScript functions is a little spotty at this point. 

Here's the script that collects the variables and launches the email function. Note the encodeURIComponent functions embedded in the subject and body variable construction. These should ensure that your function will work with clients like gmail:

var player=GetPlayer();

var js_finalScore=player.GetVar("finalScore");

var user_email=player.GetVar("TextEntry");

var subjectLine=encodeURIComponent("Final Score for XXX Module");

var body=encodeURIComponent("A participant ("+user_email+") has completed the XXX Module with a score of: "+ js_finalScore +". " );

var link = "mailto:yourAddress@email.com"+"?subject="+subjectLine+"&body="+body;

window.open(link);

 

To simplify grabbing the score, I transferred the score value from the built-in results variable to a custom created variable.

Frank McConnell

Hi Steve,

I tried the quiz that you created and it worked just fine. I duplicated what you did in a test quiz and I received the following result:

A participant (Frank Natt) has completed the XXX Module with a score of: null. I was able to pull in my name just fine but the score is "null". I know what ever it is it's minor but I'm having a heck of a time trying to find it.

Kumiko Borman

Hello Steve! I am hoping you can help.  

On one of the slide, I have a couple of text fields where a user enters personal information that should go to the email body.  I was able to generate an email with the subject line and the start of the body, but am having a hard time writing a syntax that can display the user-entered data from those text fields. 

My goal is to have these three values displayed in three separate lines, like:

Participant Name:
Position:
Coordinator Name:

Here is what I have now:

var email="myemail@orgname.org";
var subject="Volunteer training completed";
var body_start="Hello, this is to confirm that I have completed the Volunteer training module.";
var mailto_link='mailto:'+email+'?subject='+subject+'&body='+body_start;

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

var player=GetPlayer();
var user_name=player.GetVar("TextEntry1");
var user_position=player.GetVar("TextEntry2");
var coord=player.GetVar("TextEntry3");

Any help you could give would be much, much appreciated!

Kumiko

Tabatha Willis

Kumiko - I have something similar. I need to have what the user types sent in an email. See screen shot. I've used your text above, but I never receive the email. I would like to have the email read like below.

Subject: Status Update - Response

Body: whatever is entered in "TextEntry13" in the course

Any help you can provide is greatly appreciated.

Thanks,

Tabatha

 

 

Tabatha Willis

Hi Steve - I'm hoping you might be able to assist. 

I have something similar, but its just text I need emailed not the results. I need to have what the user types sent in an email. See screen shot. I've tried using your text above and Kimoko's, but I never receive the email. I would like to have the email read like below:

Subject: Status Update - Response

Body: whatever is entered in "TextEntry13" in the course

Any help you can provide is greatly appreciated.

Thanks,

Tabatha

This discussion is closed. You can start a new discussion or contact Articulate Support.