I realise that Storyline doesn't report Scorm results when used in an iPad, but I thought I could just email the percentage or that fact that they completed to an email address, and 'Complete' them manually in the LMS.
Unlike Quizmaker, there doesn't seem to be an option for this. Anyone found a way around this?
Thanks Bruce. I did try this trigger, and it worked that it only triggered if the person had passed but it only creates a blank email, so I got stuck again.
I use the "Jump to URL/File" trigger. I just build a "Course Completion" button on the slide with instructions on how to receive course completion (see image below). In the trigger itself, simply type:
I usually will put the course name in the subject so then I know they completed the course when I get an e-mail from them with that subject line. This won't help you with receiving a percentage score but would be a way to do completion via an iPad. This does work, I've tested it inside the Mobile Player on the iPad.
I'm confused, because if you look at the story.js file, it does have an EmailResults function, much like the presenter files do. This implies that it is possible to send results by email...
Yeah, I just found something similar that did this. Next question is how to use the javascript window to send the variables to an asp/php file so that I can submit them to my database...
I'm looking into whether it's possible, but not finding much of use!!
I'd be interested in that, too Chris. I would think once you got your variable date sent out via Javascript, PHP could then pull that into whatever database you need. Unfortunately, PHP is not a language I've spent a lot of time learning....yet
Then you can create a page at the other end in asp/php that reads the data from the url and writes it to your database. I already have a file that works, so I just need to adapt it to work for this. You can add other variables by creating variables and calling them from your storyline variables, then putting '&anotherVariable' +yourData2 and so on after yourData1 in the window.open command.
Additional to this, I have found that I needed to create a new variable for reporting the score of the course. I called this"result" and set a trigger to adjust the variable to be equal to Results.ScorePoints for the start of the timeline on the results slide.
I think I'm right in saying that the iPad Mobile App player isn't as comprehensive/competent in the Javascript that it will run as the Flash story output (please correct me if I'm wrong here). But the code that you've supplied, Chris, does it run on iPad mobile player happily?
If so, does it work OK, I wonder, it the story and the asp page are on different servers - do any pesky pop-ups or cross-domain warnings appear?
Please help. I am newbie here. On my quiz when a user passed', I want to add a button that will display the result to another HTML page but I don't know how to make it work. please help
One way to achieve what you're looking to do is really quite simple. As you mentioned, insert a button to your Results screen.
That's the easy part. The question I have for you is what is on the external HTML page? If it's just static text and/or information, just add a trigger to the button you added on the Results screen with: "Jump to URL/File > [nameofpage.html] > when user clicks > 'this' button. There are two ways to point to that HTML page - 1) Relative, or 2) Absolute.
If it's Relative, you'll need to add that HTML file after you publish you project and insert the file in the root directory where your story.html file lives.
If i'ts Absolute, include the entire http:// path to your button's trigger. This of course would mean the page you're wanting to direct users to is already a published page on a web server.
The next question if I understand your question you are wanting to pass the results from your Quiz out of your project and then display those results on your own custom HTML page. This is also possible, but it involves javascript and some CSS styling. Where the javascript would pull your quiz variable results into the HTML page and the CSS would style it in a format that's readable.
Hello. I am wanting to do something similar to the first post: Send an email to a specific address when the user passes or fails. The email will communicate the users name, the course name and the results . Ideally Id like this to be automatic.
I tried using the send email but it was just blank. I can see that you can use the Jump to URL/File and some code has been provided above but I am not a developer so am not sure how i could create this. Any help would be great.
One way to achieve what you're looking to do is really quite simple. As you mentioned, insert a button to your Results screen.
That's the easy part. The question I have for you is what is on the external HTML page? If it's just static text and/or information, just add a trigger to the button you added on the Results screen with: "Jump to URL/File > [nameofpage.html] > when user clicks > 'this' button. There are two ways to point to that HTML page - 1) Relative, or 2) Absolute.
If it's Relative, you'll need to add that HTML file after you publish you project and insert the file in the root directory where your story.html file lives.
If i'ts Absolute, include the entire http:// path to your button's trigger. This of course would mean the page you're wanting to direct users to is already a published page on a web server.
The next question if I understand your question you are wanting to pass the results from your Quiz out of your project and then display those results on your own custom HTML page. This is also possible, but it involves javascript and some CSS styling. Where the javascript would pull your quiz variable results into the HTML page and the CSS would style it in a format that's readable.
Hope this helps.
Thank you very much for your reply. Yes I want Relative, However I don't know about javascript. I will be very happy if you or somebody can give me an example on how to make it work.
Then you can create a page at the other end in asp/php that reads the data from the url and writes it to your database. I already have a file that works, so I just need to adapt it to work for this. You can add other variables by creating variables and calling them from your storyline variables, then putting '&anotherVariable' +yourData2 and so on after yourData1 in the window.open command.
Hey Chris,
Did you manage to try this out? Did it work?
I wonder if instead of window.open we can call a javascript function which uses jQuery to make an ajax call to the PHP script?
1. It'll eliminate a popup window (less popups are always good)
2. It'll (somewhat) hide the URL of the php script from the user
I'm so glad this post has helped other people. i gave up on this idea because I didn't think the javascript would work on an iPad. Turns out my LMS can track Storyline courses on iPad when published in HTML5 so I'm sweet anyway. (I had panicked because of the support stuff saying any LMS needing a secure login wouldn't work for iPad)
But for future clients who don't want an LMS this thread will be invaluable.
I've tried to email results, using the following code:
var score = player.GetVar("Results.ScorePoints"); var email="kelly@mycompany.com"; var subject="Course Name Results"; var body_start="I've completed the Course Name 101 course with a score of "; var mailto_link='mailto:'+email+'?subject='+subject+'&body='+body_start+score; win=window.open(mailto_link,'emailWin');
And yet nothing happens when I click Submit in the published version. Not sure what I'm missing... (Admittedly, I'm not that familiar with Javascript.)
It appears you are correct, it doesn't work with Flash, only with the HTML5 version.
Kelly, this is the same issue you are having. I've tested your code, and it works fine with the HTML5 version. but nothing happens in the Flash one. So I guess if you have new enough browsers to run the HTML 5 version, it wont be a problem, but otherwise, it's a case of back to the drawing board...
76 Replies
Hi Jacinta...
I think what you are looking for is done by setting the appropriate Trigger in the Results slide, (see image below).
I have not used this myself, however, it may provide you with what you need.
Please let us know,
Bruce
Thanks Bruce. I did try this trigger, and it worked that it only triggered if the person had passed but it only creates a blank email, so I got stuck again.
Hi Jacinta,
I use the "Jump to URL/File" trigger. I just build a "Course Completion" button on the slide with instructions on how to receive course completion (see image below). In the trigger itself, simply type:
mailto:WhateverName@domain.com?subject=
I usually will put the course name in the subject so then I know they completed the course when I get an e-mail from them with that subject line. This won't help you with receiving a percentage score but would be a way to do completion via an iPad. This does work, I've tested it inside the Mobile Player on the iPad.
Jamie you are a rockstar, that's brilliant. I did the trigger with a condition, so it only sends an email if the person passes.
Awesome.
Just to push the boat out a bit, any ideas how I might get the variable for the result %Result.ScorePercent% in this mailto ?
And therefore also be able to add their name from a variable created through data entry...
I'm confused, because if you look at the story.js file, it does have an EmailResults function, much like the presenter files do. This implies that it is possible to send results by email...
Courtesy of Steve Flowers from an older conversation. You could use the Execute Javascript to send an email:
*******************
//create a player object
var player=GetPlayer();
var userEmail=GetVar(“emailFromStoryline”);
var userScore=GetVar(“scoreFromStoryline”);
//construct the link
var link= userEmail
+"&subject=" + encodeURI
("Course Completion!")
+"&body=" + encodeURI
("Congratulations! Your score for thiscourse is"+ userScore +".");
window.location.href= link;
********************
Just another idea.
Yeah, I just found something similar that did this. Next question is how to use the javascript window to send the variables to an asp/php file so that I can submit them to my database...
I'm looking into whether it's possible, but not finding much of use!!
I'd be interested in that, too Chris. I would think once you got your variable date sent out via Javascript, PHP could then pull that into whatever database you need. Unfortunately, PHP is not a language I've spent a lot of time learning....yet
I've got it... in a very basic way:
var player = GetPlayer();
var yourData1=player.GetVar("yourVariable");
window.open('yourasporphpwebpage.com?email='+yourData1);
Then you can create a page at the other end in asp/php that reads the data from the url and writes it to your database. I already have a file that works, so I just need to adapt it to work for this. You can add other variables by creating variables and calling them from your storyline variables, then putting '&anotherVariable' +yourData2 and so on after yourData1 in the window.open command.
Additional to this, I have found that I needed to create a new variable for reporting the score of the course. I called this"result" and set a trigger to adjust the variable to be equal to Results.ScorePoints for the start of the timeline on the results slide.
I think I'm right in saying that the iPad Mobile App player isn't as comprehensive/competent in the Javascript that it will run as the Flash story output (please correct me if I'm wrong here). But the code that you've supplied, Chris, does it run on iPad mobile player happily?
If so, does it work OK, I wonder, it the story and the asp page are on different servers - do any pesky pop-ups or cross-domain warnings appear?
Hello,
Please help. I am newbie here. On my quiz when a user passed', I want to add a button that will display the result to another HTML page but I don't know how to make it work. please help
Hi John,
Welcome to the forums!
One way to achieve what you're looking to do is really quite simple. As you mentioned, insert a button to your Results screen.
That's the easy part. The question I have for you is what is on the external HTML page? If it's just static text and/or information, just add a trigger to the button you added on the Results screen with: "Jump to URL/File > [nameofpage.html] > when user clicks > 'this' button. There are two ways to point to that HTML page - 1) Relative, or 2) Absolute.
The next question if I understand your question you are wanting to pass the results from your Quiz out of your project and then display those results on your own custom HTML page. This is also possible, but it involves javascript and some CSS styling. Where the javascript would pull your quiz variable results into the HTML page and the CSS would style it in a format that's readable.
Hope this helps.
Hello. I am wanting to do something similar to the first post: Send an email to a specific address when the user passes or fails. The email will communicate the users name, the course name and the results . Ideally Id like this to be automatic.
I tried using the send email but it was just blank. I can see that you can use the Jump to URL/File and some code has been provided above but I am not a developer so am not sure how i could create this. Any help would be great.
An example is in this thread toward the top ^
Hey Chris,
Did you manage to try this out? Did it work?
I wonder if instead of window.open we can call a javascript function which uses jQuery to make an ajax call to the PHP script?
1. It'll eliminate a popup window (less popups are always good)
2. It'll (somewhat) hide the URL of the php script from the user
What do you think?
Jacinta, did you ever get a reply in some form to this?
Hey Omar, this is what I've done, and it seems to have worked for me:
create variable called result
Add a text field for user to enter email address.
Create variable for the text field value called emailAddress
Create trigger to change result to same value as Results.ScorePoints
Create a button that says "submit"
Create a trigger to execute the following javascript
var player = GetPlayer();
var course="Storyline test course"
var email=player.GetVar("emailAddress");
var score=player.GetVar("result");
window.open('http://yourAsporPHPFile.asp?email='+email+'&course='+course+'&score='+score, '_top');
Thanks Chris, but I am not sure if I understand this item: Create trigger to change result to same value as Results.ScorePoints
Can you elaborate a bit more for me? Note: I am sooo to new to this so thanks for accommodating me.
I'm so glad this post has helped other people. i gave up on this idea because I didn't think the javascript would work on an iPad. Turns out my LMS can track Storyline courses on iPad when published in HTML5 so I'm sweet anyway. (I had panicked because of the support stuff saying any LMS needing a secure login wouldn't work for iPad)
But for future clients who don't want an LMS this thread will be invaluable.
Hi,
Just to clarify something: the code you posted there:
var player = GetPlayer();
var course="Storyline test course"
var email=player.GetVar("emailAddress");
var score=player.GetVar("result");
window.open('http://yourAsporPHPFile.asp?email='+email+'&course='+course+'&score='+score, '_top');
doesn't seem to work in the Flash output. However, it works ok in the HTML5 output.
Is that what is expected ?
Thanks
I've tried to email results, using the following code:
var score = player.GetVar("Results.ScorePoints");
var email="kelly@mycompany.com";
var subject="Course Name Results";
var body_start="I've completed the Course Name 101 course with a score of ";
var mailto_link='mailto:'+email+'?subject='+subject+'&body='+body_start+score;
win=window.open(mailto_link,'emailWin');
And yet nothing happens when I click Submit in the published version. Not sure what I'm missing... (Admittedly, I'm not that familiar with Javascript.)
It appears you are correct, it doesn't work with Flash, only with the HTML5 version.
Kelly, this is the same issue you are having. I've tested your code, and it works fine with the HTML5 version. but nothing happens in the Flash one. So I guess if you have new enough browsers to run the HTML 5 version, it wont be a problem, but otherwise, it's a case of back to the drawing board...
Chris
This discussion is closed. You can start a new discussion or contact Articulate Support.