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.
- AnneBloodCommunity Member
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
- CynthiaPhelpsCommunity Member
Hey Steve,
I love your solution, but My clients were not happy with having to print a webpage. They really want the certificate to be generated as a PDF, since their constituents know how to print and save a digital copy of a PDF.
Have you done anything like this before?
c
- SteveFlowersCommunity Member
Hi Cynthia -
Traditionally, you'd need a server side application to generate a PDF. But there's a way to do that with JavaScript. If I get some time this week I'll post an example.
- CynthiaPhelpsCommunity Member
You rock, Super Hero Steve!
- NancyWoinoskiSuper Hero
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. - NancyWoinoskiSuper Hero
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.
- REENAMITTALCommunity Member
Hi,
certificate is also print by the java script but it is only work in html5(all browser). and in simple html it is work in i.e browser
Please reply if you can print certificate in all browser in simple html.
Thanks
- SusanStewart1Community Member
Daniel David said:
Daniel, the dropbox link for this guide is "invalid". Can you please relink? Thanks so much!Susan
- StephenConeCommunity Member
Mike Tschirn said:
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.
Hi Mike,
I apologize for not seeing this message when I was scanning this thread earlier, but I did want to pass this along. One tool that I find to be invaluable is the ADL Test Suite. You can use the ADL Test Suite to perform a local SCO test. The Test Suite will mimic a SCORM compliant LMS and you can modify settings such as the user-name, etc prior to launching the SCO. Just make sure you point to the index_lms file before launching the test.
It's usually the first tool I reach for when I need to test or verify SCORM functionality/interactions regardless of the development tool that was used to create the courses.
- felicityburkeCommunity Member
Hello,
Forgive me if I am repeating a problem, but could someone check my javascripts below? This is on a slide trigger in Storyline Articulate to execute when the timeline starts.
var currentTime = new Date();
var month = currentTime.getMonth() + 1;
var day = currentTime.getDate();
var year = currentTime.getFullYear();
var dateString=day + "/" + month + "/" + year;
var player = GetPlayer();
player.SetVar("SystemDate",dateString);I have a print button on my certificate with this trigger-execute javascript when user clicks button
"window.print()"
within the certificate I have name variable which works
%FirstName% %LastName%
and date variable which works
%SystemDate%
The certificate looks fine, the autofills work - it will just NOT PRINT from my print button in the LMS or elsewhere.
Is there a quick fix I am missing???