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.
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.
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.
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, I'd love to see how you got this work. And can this work with text entry variables that I've created, or does it have to use built in quiz questions and the results page?
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
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
10 Replies
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.
Thanks for the help Steve. This is exactly what I was looking for!
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.
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
I spent some time with a programmer husband and was able to accomplish what I wanted! If anyone is interested I'd be happy to share.
Kumiko, please share
Kumiko, I'd love to see how you got this work. And can this work with text entry variables that I've created, or does it have to use built in quiz questions and the results page?
Thank you!
Kumiko, yes please do share. I'm sure we'd appreciate the detailed explanation.
Thanks!
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
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.