Forum Discussion
Example files: Generating a certificate from Storyline
This example demonstrates how you can take user input and generate a certificate for printing. Any Storyline variable or score can be used to generate the output. The file and file add-ins are both simple and straight forward. This will only work in the Flash based output. This will not work in the iOS output or HTML5.
To replicate this on your end:
1) Modify the story file to your liking.
2) Extract the add-in zip file above (certificate.html and certificateBG.gif)
3) Copy these two files into your published output directory. You'll need to do this each time you publish.
This is a really basic example. You really can do quite a bit with this including adding a print button, extra fields, collecting values from the LMS like the user's first and last name.
** I noticed a bug when playing with this file setup. I initially thought I would be able to include the certificate files as resources to avoid copy / paste surgery after publish. Unfortunately, Storyline mangled the HTML file on publish. Will be submitting this as a bug.
- MikeTschirnCommunity Member
I have tried everything here, to the letter. Our LMS server is not up and running yet, so I am only trying locally. There is no way that the text appears on the certificate, no matter what I try.
Please don't suggest that I need to re-read this forum, done that 10 times and I do know my way around the code, it simply does not generate text on some machines when working locally for some reason.
This is disappointing as I (and many others) spend too much time trying to generate a simple certificate of completion to no avail, and all because Storyline doesn't include it as standard - one would have thought that this would have been part of the program in the first place, it is after all a training program isn't it??
- SteveFlowersCommunity Member
Hi, Mike -
Certificates can mean many things to many folks (looks, styles, fields). I'd imagine this is why the feature wasn't prioritized and isn't included by default. I would definitely suggest the feature if it's something that is important to you. Even so, there are a few methods you can use to print a certificate in the current feature set:
- Use a JavaScript Trigger to execute window.print(); for the currently displayed slide. You could make a slide that looks like a certificate. Downside is this will always print in portrait and will include any navigation.
- Use a JavaScript Trigger to open a custom HTML page included either within the Story file or from an external link.
- Use a JavaScript Trigger to write custom window contents.
- Build (or have someone build) a custom Flash widget that handles certificate printing for you. Keep in mind this won't work in the HTML5 output.
Unfortunately, the inability for Flash to talk to the browser is a Flash player limitation (or feature), not a limitation of Storyline itself. Concerning the method described in this thread, there are a couple of things you might try running locally. More than likely, you're looking at an issue with the Flash Security Sandbox (a feature, really )
1) Publish as CD. This still publishes to HTML but also outputs an EXE file that bypasses all of the security sandbox features and ActiveX warnings produced in IE. This will let you test it locally.
- OR -
2) Try adding your published folder to the Flash Security Settings Manager (it's a whitelist that'll allow the player to communicate with JavaScript locally). http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
- MirrenPalmerCommunity Member
I have been having a go at this and can follow the logic of everything that has been suggested but have run into a very basic problem and cannot for the life of me see why it doesn't work.
- I am using Storyline
- There is no quiz so I am using the report.html and Java Script button supplied by Steve (thank you)
- I am wanting to upload to Articulate Online so am following the Screenrs from Justin and Daniel David (thank you, too!)
- I have downloaded 7-Zip and at this stage am just trying to get the basic certificate working (I have not modified the html file yet)
- I can unzip the SL1 file, add in the 2 files from Steve, re-zip OK, change the file extension to .sl1 and upload to Articulate On-line
- When I click the 'Print Certificate' Button I get a message saying the webpage no longer exists (see below). I can see it is trying to access the certificate.html file which is there in my published output so tried putting it in story_content and the external file folder (where it was originally) but get the same result with both. Can someone confirm where in the Storyline published output the 2 files need to go? or is this another issue?
I feel as though I really deserve to get my Grueller certificate after this one!
Thanks to all who have contributed to this thread (-:
- MikeTschirnCommunity Member
Thanks Steve, very useful post indeed and I understand your options. Also understand Flash restrictions - have used flash builder etc
I will try these out one day, overspent my time on this certificate problem, so will worry about it another time.
Cheers
- LynneThomas1Community Member
I am having the same issue. The text will not appear. Has anyone figured out what can be done to correct this?
Thanks!
- AshleyWCommunity Member
Alright, I had this down, was adding my own stuff, etc. But now...it's been months since the last time I used it and I can't figure out what's going wrong.
I built my own certificate, might that be the problem? Does the background on it need to be transparent or something?
- AshleyWCommunity Member
Got it guys , had a stray semi-colon screwing everything up.
- GavinHenryCommunity Member
Hi Steve,
i have literally copied what you have instructed to do in this thread, end result is after completing my quiz i get a pop up window with the certificate but the text entry field is not showing any of the text i input at the start. Do you know what possibly could be the problem?
I've attached the link to my document below:
http://insitupreviews.com/e-learning/QUIZ/story.html
also I've attached the folder containing the elements.
Kind Regards
Gavin
- NancyWoinoskiSuper Hero
Gavin Henry said:
Hi Steve,
i have literally copied what you have instructed to do in this thread, end result is after completing my quiz i get a pop up window with the certificate but the text entry field is not showing any of the text i input at the start. Do you know what possibly could be the problem?
I've attached the link to my document below:
http://insitupreviews.com/e-learning/QUIZ/story.html
also I've attached the folder containing the elements.
Kind Regards
Gavin
Hi Gavin, I'm wondering if you named the text variable inside Storyline properly. When you create a text entry field, Storyline assigns a default variable name to it - the first one you create is variable1, the second variable2 etc.In Steve's example, he renamed the text field for the user name to learnerName. The variable for your text field needs to have this name as well.
- GavinHenryCommunity Member
Nancy Woinoski said:
Gavin Henry said:
Hi Steve,
i have literally copied what you have instructed to do in this thread, end result is after completing my quiz i get a pop up window with the certificate but the text entry field is not showing any of the text i input at the start. Do you know what possibly could be the problem?
I've attached the link to my document below:
http://insitupreviews.com/e-learning/QUIZ/story.html
also I've attached the folder containing the elements.
Kind Regards
Gavin
Hi Gavin, I'm wondering if you named the text variable inside Storyline properly. When you create a text entry field, Storyline assigns a default variable name to it - the first one you create is variable1, the second variable2 etc.In Steve's example, he renamed the text field for the user name to learnerName. The variable for your text field needs to have this name as well.
Hi Nancy,I've tried it all but i can't seem to get it working, when ever i change the name of the text field my images doesn't show and what ever text steve had in the first place reveals itself!
I'm so lost...
Gavin