Sending feedback email from TinCAN with the details of the document

Hi,

I'd like to add a "send feedback' feature to the TinCAN online modules we create with SL360

Not just the simple email link you can find in many documents/webpages, but something a bit more complete.

The feature should pop up an outlook email but filled with some details about the module name and the page number the email is being sent from, so users only have to type in their feedback and send the email.

I do it in powerpoint with a simple macro. Is this feasible in SL360?

1 Reply
Matthew Bibby

Sure, that is possible, as long as you have the relevant information available in Storyline.

Here's an example.

Create the following variables in Storyline:

  • ModuleName (populate with the module name)
  • PageNumber (leave blank)
  • Feedback (leave blank)

You'll need a trigger on each slide that says something like "Change the variable PageNumber to 1 (or whatever number you want)". 

And when people go to enter their feedback, it should be typed into a text entry field that uses the variable Feedback

Then you'll need an Execute JavaScript trigger at contains the following, which should run when people submit their feedback:

​var player = GetPlayer();
var email = 'your_email@address.com';
var module = player.GetVar('ModuleName');
var page = player.GetVar('PageNumber');
var fbk = player.GetVar('Feedback');
var browser = navigator.appVersion;
var path = window.location.pathname;
var subject = 'Course Feedback';
var emailBody = 'Here is some feedback:' + '\n' + fbk + '\n\n' + '--------------------Please do not change anything beneath this line.--------------------' + '\n\n' + 'Module name: ' + module + '\n\n' + 'Page number: ' + page + '\n\n' + 'Browser information: ' + browser + '\n\n' + 'Pathname: ' + path;
var mailto_link = 'mailto:' + email + '?subject=' + subject + '&body=' + encodeURIComponent(emailBody); win = window.open(mailto_link, 'emailWin');

The browser information can be used to determine what browser was being used to view the course. If you need help making sense of it, go to useragentstring.com

And the path name will tell you if they are viewing the Flash or HTML5 output as it'll either say story_flash.html or story_html5.html.

Here is a demo and here is the source file.

You may also find this update and these frequently asked questions interesting.