Articulate Online - Quiz - Certificate - completion email

Mar 30, 2017

Hello -

I am using Articulate Storyline 2 and publishing to Articulate Online.

I am in need of a way to be notified of a user's module completion so I can send them a certificate of completion. Ideally - I would like to auto-generate a certificate but it doesn't look like I can do that. The rub...some of the modules will be public so they will not have to log in. I would like to add a freeform text box quiz at the end perhaps? I would just ask for their name and position...but I can't figure out where that information is stored. Or...is it possible for them to enter that information in a text box and the information is sent to me?

Open to ideas - suggestions. Bottom line - I need to know who they are and when they completed so I have a record and they can get a completion certificate somehow.

 

8 Replies
OWEN HOLT

I've also used a JavaScript email solution in the past.

Here is the JavaScript triggered by the "Email" button:

//link to the SL player
var player = GetPlayer();

//get the "send to" email address stored in a variable called DSAemail
var targetemail=player.GetVar("DSAemail");

//get the email subject line stored in a variable called SubjectLine
var subject=player.GetVar("SubjectLine");

//get the additional user inputs stored in various variables for use in the email body
var name1=player.GetVar("NewName");
var badge1=player.GetVar("Badge");
var cert1=player.GetVar("Certification");

//create the email body content
var content="Name: "+name1+"%0d%0A%0d%0A";
content+="Badge: "+badge1+"%0d%0A%0d%0A";
content+="Certification: "+cert1;

//create the email for the user to send
var mailto_link='mailto:'+targetemail+'?subject='+subject+'&body='+content;

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



OWEN HOLT

Sounds great. Until then, see if this explanation of the code I posted above helps. 

1) Any line that begins with a "//" is just a comment. Comments are ignored by JavaScript (JS) but they are useful to you as a prompt to remember what is happening or if someone else might be modifying your project in the future. Commenting code is a good practice.

2) Anything that begins "var" is declaring a new JavaScript Variable. Just like in StoryLine, a JS Variable acts as a container that you can call up later. The word that follows "var " is the name of the JS variable and what follows after the equals sign is the value you are assigning that variable.

3) var player = GetPlayer(); creates a JS variable that calls up the StoryLine player. You will always use this if you want to use or change the values of your StoryLine variables using JavaScript. In this example, we are only using data stored in StoryLine variables that we want to show in our email.

4) These lines are simply creating JavaScript variables that corresponds to each of the StoryLine variables we are using and then assigning the JS variable the same value currently stored in SL. Remember, the JS variable that we created called "player" is actually a call to the SL player. So "player.GetVar("SL variable name");" communicates with SL to get the value or content stored in the specified SL variable.

5) These lines are building / adding data to a JS variable we just created called content. This will be your email content. The first line establishes the variable and begins to build content. The items in green are just text we are assigning to the variable. The plus signs add content. What you see in yellow represent whatever is stored in a JS variable (which really came from SL originally). That last bit in purple is the HTML code for a hard return. The 2nd and 3rd lines start with the JS variable name "content". This just opens up the existing content variable for us to modify it further. In this case we are adding more content. This could have all been done in a single line of code, but breaking it up this way makes it easier to see it in a format that is similar to how it will look in the final product.

6) This is the standard HTML format for an email link. We build it and store it in a JS variable. In this example, I named the JS variable "mailto_link"

7) This line instructs the window to open the link you just created. The result should be that the users email client opens up a new email, populates it with the destination address, subject line, and content body. The user still needs to hit send to actually send the email.

The resulting email looks something like this.

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