Example files: Generating a certificate from Storyline

May 09, 2012

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.

236 Replies
Cheryl Daubney

This all looks waaaayy too complicated for me!!   Is there not a way to include an informal certificate of completion where the user can input their name at the beginning of the course, then this would be picked up by the certificate as well as the test score, date and name of the course???  Is there a simple way to do this??   And could this be added to Storyline as a standard feature?!

Gerry Wasiluk

Cheryl Daubney said:

This all looks waaaayy too complicated for me!!   Is there not a way to include an informal certificate of completion where the user can input their name at the beginning of the course, then this would be picked up by the certificate as well as the test score, date and name of the course???  Is there a simple way to do this??   And could this be added to Storyline as a standard feature?!

Will you be using this with a LMS?
Cheryl Daubney

Hi Gerry

No - we want to have 'informal' learning on our L&D portal that allows users to test themselves (and capture that via a printable certificate) but without them having to log into the LMS (which they can't do if they are accessing from home).  We are trying to encourage participation and the LMS is a big headache so attempting to put as much as we can on the web. 

Thanks

Cheryl

Mike Tschirn

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??

Steve Flowers

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

Mirren Palmer

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 (-:

Gavin Henry

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

Nancy Woinoski

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.

Gavin Henry

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

Anne Blood

Steve, I have been trying to use your cert. to understand how it works. I'm not getting anywhere. I'm using storyline and AO for publishing. When I launch it in AO, it says certificate.html not found. I'm not too computer saavy, especially html or php. Could you explain step by step, with screen shots if possible, how to get your .story to work on AO.

Thanks,  Anne

Nancy Woinoski

Gavin Henry said:

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


Hi Gavin, sorry I did not get an update to this post in my email so did not see your response. I'll take a look at your stuff and see if I can tell where you are going wrong.

Nancy Woinoski

Nancy Woinoski said:

Gavin Henry said:

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


Hi Gavin, sorry I did not get an update to this post in my email so did not see your response. I'll take a look at your stuff and see if I can tell where you are going wrong.


Hi Gavin, I found one problem - you have named your certificate html document  certificates.html and your code is looking for certificate.html.

So when I changed the name of the file I got this.

Looks good - but the Student's name is not coming through.  You are  missing code from the html  to display the learner's name in the certificate.html file. It looks like it has been cut off. I tried fixing it but the name is still not coming through so will really need to see your .story file to see what variable name you are trying to pass.