Java Script, Storyline 360 and Learner Feedback

Combined Forces of Awesomeness

How to Solve the Contact Problem

I was working on a large module recently that could have actually been broken apart into several smaller modules. My stakeholders were against the idea of “chunking” the module, so I had to make due and find a reasonable way to break things up and assess understanding and questioning throughout the course.

This course is designed for higher ups and is meant to provide an overview rather than to actually educate them on specifics. Because of this niche audience, “knowledge checks” didn’t really make sense, but rather it would be more valuable to capture their thinking at the end.

I wanted to send this reflection to the trainer who is managing the face to face interaction with the stakeholders and to the designer. Storyline does have a trigger called “email” but all this does is open an empty email in the learner’s email client using a simple mailto: variable.

I wanted the email to open and have the following things:

  • Addressed to the trainer and CC the designer.
  • Subject line filled in with the section titl of the module and the 0/5 ranking the user provided.
  • Body of the email filled in with the users text entry containing their thoughs, questions and opinions about the section.

To do this, I needed to create some java script and execute it with the execute java script trigger.

Don’t Reinvent the Wheel, Use Your Resources

I don’t have a vast understanding of java script and I wasn’t going to enroll in a course to improve my knowledge. I needed a solution and I need it done today.

I have done some light java scripting to create completion certificates. I learned this basic skill from the Devlin Peck Community so I wasn’t going into this completely ignorant. My prior experiences had been identical to the flow described in Devlin’s tutorial, which would not work in my current situation because I was not useing AWS for my testing and hosting. I am currently confined to Review360 and I wasn’t sure that the platform supported the execution of java script. I also wasn’t sure how I would get my custom user.js file to go up into the platform even if it did support Js because I was use to the flow of creating the file, putting it in the export folder and modifying the head tag in the html.

After about 20 minutes of Googling and looking at Articulate forum posts that were > five years old, I reached the conclusion that Review360 did support Java script execution. So I figured I would put everything into the trigger window for execute java and see what happens.

Reusing Code

As I said before, I can’t just create something from nothing when it comes to Java script. After about 20 minutes more of Googling and reading posts, I found an Articulate resource that had the basic information I needed to get started.

This is the very basic code to accomplish my task:

var subject="subject line";
var body_start="How you want to begin your body.";
var mailto_link='mailto:'+email+'?subject='+subject+'&body='+body_start;
win=window.open(mailto_link,'emailWin');

Using this code as it is written will not work.

Articulate did not have specific documentation on Java scripting and from their forum replies, I get the feeling they try to stay away from supporting it as much as possible. I instead used examples from Zsolt Olah’s POP(99); project to find out how to properly put the code into the editor and get it to launch appropriatly.

The big missing piece of the puzzle was the very first line where you had to declare the player variable.

var player = GetPlayer();

That line is what connects all your code below to the custom made variables or any other variable used in the storyline file.

Using the information from POP(99); and the Articulate documentation, I was able to get the following functional code.

1 var player = GetPLayer();
2 var email = ("[email protected]");
3 var rank = player.GetVar ("star01");
4 var subject = ("Claim Initiation Inquiries- "+ rank + " star ranking");
5 var bodv_start = player.GetVar("InitiationFeedback");
6 var mailto_Link = 'mailto:'+email+'?subject='+subject+'&body='+body_start,
7 win = window.open(mailto_link, 'emailwin")

Line 1 connects everything between the user.js and the storyline file.

Line 2 is where you would put in the trainer’s email. I left off CC’ing the designer at this stage.

Line 3 captures the user’s star ranking for the specific lesson.

Line 4 sets the email subject line with some text and the value of the star ranking.

Line 5 sets the body of the email to the collected text entry variable.

Line 6 combines everything together.

Line 7 opens a new window and puts in all the information into the email.

I think this is a valuable way to gather and distrubte information.

Kyle Bracchi
Kyle Bracchi
Instructional Designer at

I am constantly learning, applying what I learn and iterating on my work.