User notes that they can print and email

Dec 10, 2013

Hi all. I built a course earlier this year that contains a "notes" function to allow users to take a moment to reflect and type their thoughts on certain questions. This is used in place of a typical multiple response/choice type question. Thought I'd share it here with you!

Here are the files:

Screenr Part 1: Demonstration - https://player.vimeo.com/video/204928444

Screenr Part 2: How It Was Built - https://player.vimeo.com/video/204928450

Storyline Source: https://bit.ly/3Kd96as

Published Output: https://bit.ly/3Z0hj5X

Cheers!

Stephanie

238 Replies
G G

I know this is an old thread, but hoping there are still some followers...

I modified Stephanie's Javascript for a course I'm developing in which I want to compile several variable values into an email at the end of the module. Most are text variables, which seem to be working fine, but I'd also like to include the learner's score on the assessment in the module (using the system variable Results.ScorePoints). No matter what the actual score is, when I compile the JavaScript email at the end of the course, it says "null" where that point value should be.

This is my first attempt at doing anything with JavaScript so I'm just guessing here, but maybe it's because it's a numeric variable rather than text? Is there a way to convert numeric variables to string in the JavaScript that someone would be able to show me?

Below is the JavaScript code I'm using, followed by the text of the email it compiles:

var player = GetPlayer();
 

var useremail=player.GetVar("UserEmail");

var username=player.GetVar("UserName");

var usernamepledge=player.GetVar("UserNamePledge");

var subject="Module 1 Portfolio Notes";

var exercisenotes1=player.GetVar("Reasons");

var exercisenotes2=player.GetVar("FirstMgtDescrpt");

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

var mgmtdescrpt=player.GetVar("MgmtDescrpt");

var systemdate=player.GetVar("SystemDate");

 
var mailto_link='mailto:'+'hello@graciagoldberg.com'+'?subject='+subject+'&body='+"Module 1 Portfolio Notes for:"+username+"("+useremail+")%0d%0A%0d%0AReflection 1 - Top Reasons For Going into Business:%0d%0A%0d%0A"+exercisenotes1+"%0d%0A%0d%0AReflection 2 - The Role of Manager in My Organization:%0d%0A%0d%0A"+exercisenotes2+"%0d%0A%0d%0AManagement Inventory Assessment Score:"+mgmtscore+"%0d%0AWhat your score means:"+mgmtdescrpt+"%0d%0A%0d%0A"+usernamepledge+" signed the Course Commitment Pledge on"+systemdate;

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

Here is the email currently being created (variable values are in bold):

Module 1 Portfolio Notes for:Gracia(hello@graciagoldberg.com)

Reflection 1 - Top Reasons For Going into Business:

example text 1

Reflection 2 - The Role of Manager in My Organization:

example text 2

Management Inventory Assessment Score:null

What your score means:You may be foundationally strong in most areas, but the areas in which you are weak may prove to be fatal. A score in this range means that there are several areas that pose a threat to the well-being of the business. Focus on becoming a better manager than is called for.

Gracia signed the Course Commitment Pledge on8/10/2018

 

I also can't seem to get it to include spaces in there if you noticed... I tried using "&nbsp" and it seemed to break everything...

Margaret Hiatt

Hello All,

For the life of me, I can't get this to work. Stephanie's file works fine but when I recreate the java in my own file it won't work.

I also am having a problem where the variables won't update when the control loses focus. Right now I am updating the variables by tabbing through.

Any help would be appreciated.

 

OWEN HOLT

StoryLine protects the score variables to protect them from direct manipulation. Try adding an additional variable in StoryLine and setting its value equal to the Results.ScorePoints variable prior to executing the JavaScript. Then pull in that variable's value.  There is no need to convert from numeric value to text.

Rally Kantcheva

Hello all,

I'm having issues trying to get the email to be sent. I have followed Stephanie's example and tried some of the later suggestions by Matthew, but for some reason my LMS does not want to open a new window and to sent the e-mail. Can anybody help, please?  Here is the code I'm trying to use:

var player = GetPlayer();
var useremail = player.GetVar('EmailN');
var pnotes1 = player.GetVar('Notes1');
var pnotes2 = player.GetVar('Notes2');
var pnotes3 = player.GetVar('Notes3');
var pnotes4 = player.GetVar('Notes4');
var pnotes5 = player.GetVar('Notes5');
var pnotes6 = player.GetVar('Notes6');
var pnotes7 = player.GetVar('Notes7');
var subject = 'Notes from Your Dissertation Topic Tutorial';
var emailBody = 'Research:' + pnotes1 + '\n' + 'Two Important Questions:' + pnotes2 + '\n' + 'What is a research question:' + pnotes3 + '\n' + 'Why is a research question needed:' + pnotes4 + '\n' + 'How and Why:' + pnotes5 + '\n' + 'Answering Why X should be done:' + pnotes6 + '\n' + 'A good research question:' + pnotes7;
var mailto_link = 'mailto:' + useremail + '?subject=' + subject + '&body=' + encodeURIComponent(emailBody);
win = window.open(mailto_link, 'emailWin');

Thanks!

onEnterFrame (James Kingsley)
  1. You probably checked this already... but is the browser blocking the popup window?
  2. You might try opening the Developer Console and seeing if any errors are shown. 
  3. There is a limit to how many characters you can put in a URL (~2000 depending on the browser). Is it possible you are hitting that limit?
Rally Kantcheva

Thanks for your ideas, James.

1 - No, there are no pop-up blockers (tried 3 different browsers on 2 different machines).

2 - Not a developper, sorry. But I've run an LMS debug report and I cann't seem to find any issues.

3 - Good point, I've not thought of that. But the problem happens even when the notes are empty or with just 'test' written in each of the 7 slides (way less than 2000 characters, including the titles, in total).

 Do you think I could have missed something in the LMS debug report?

Northern  College

Hi everyone,

Thanks Stephanie for sharing this wonderful work. This was more than 5 years ago and I still find it very useful. I wanted to implement the technique in Storyline and import to my Articulte Rise as a SL block. However, the email and print functions are not working after I embedded in my Rise project.

Can someone please tell me if this is possible in Rise or not? I have spent several hours working on the project and I need to know if it's possible to embed the technique in Rise.

Thank you.

 

Northern  College

Thanks,

I need help with this, please!

I have decided to implement my notes in Storyline 360 instead of embedding in Rise block. However, when I publish the project nothing happens on clicking the email and printer icons. When I publish with the email icon alone it works. I don't know why it is behaving this way. Please see the attached .Story file for more information. 

Thanks

Libby Veal

Hi Stephanie, 

Were you able to test this on mobile? I tried testing this on Safari on my iPhone but I can’t get it to work… When I hit the send email button, nothing’s happening.

PS. I've embedded this Storyline to a Rise block and I'm looking at it on a mobile device. I don't know if that's an issue.