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.
236 Replies
- SteveFlowersCommunity Member
JavaScript takes care of that
As long as you're not using the AMP, should be workable. Works in HTML5 and the Flash / Desktop version.
- GerryWasilukCommunity Member
Hey, Steve! Just wondering if you ever had a chance to play around around with the issue I raised.
No rush and not bugging you too much I hope
). Just grateful for your help so far (and always).
- CurtisKynerdCommunity Member
I have tried to make this work in my LMS to no avail. I get a message that says this file cannot be found. I have been experiencing other network or LMS issues lately and wonder if the two are related. Could there be issues related to IE security settings, or version differences in Java that might be affecting things? Attached is my version of the Certificate. I am grateful for any direction or advice. Thanks.
- DanielDavidCommunity Member
Hi,
I am trying to get his work, but can't even make Steve's files work.
This might be silly but which is the "published output directory"? Since SL saves one file and uses only that how can I get it to use a certificate ".html file? I guess I have to break the file, publishing it to web maybe? But how do I convert i back to ".story" file to be able to use it again?
I have no IT background whatsoever, so to change html files or javascript I would have to get a professional to come and help me but I would prefer to find a solution for this myself.
- DaveFulleCommunity Member
Hi Daniel,
I'm a little confused when you say SL only has one file. You'll need to publish the course (to LMS) and then your published output directory is the folder that is created from the publish. There are a bunch of files created. You'll need to put Steve's HTML file and Certificate graphic into that output directory.
I had to go into your HTML file, change learner name get VAR from "learner" to "TextEntry7" since this changes for me with every course created. I also had to change the file name of the graphic from "certificateBG.gif" to "CertificateBG.gif" to match what the HTML file was calling. After doing that, the name was called in properly, the background displayed, and everything printed (on the LMS - not locally)!
You can edit the HTML file in Word, notepad++ or something similar - you shouldn't need a "professional".
I hope this helps.
- NancyWoinoskiSuper Hero
Hi Daniel - Storyline has one source file this is the .story file but when you publish your course, a folder is created in Documents/My Articulate Projects folder the has the same name as the title of your course. This is the published output directory that Steve is referring too. This output directory contains all the folders and files that the course needs in order to run.
If you look in the folder you will see story.swf, story.html files, a story_content folder and a mobile folder among others.
Steve created a special html page called certificate.html that is not a native part of Storyline so when you publish Storyline it does not get included in the published directory automatically. You have to save a copy of it and then place it in the published folder after you have published your course (same is true of the CertificateBG.gig that he is using in the certificate.html page).
In the sample .story file that Steve created, he put some JavaScript on a button ( I think the button is called Generate Report ) that basically says open this certificate.html page and make it a fixed size) when the user clicks the button. You will have to include this JavaScript on a button in your course if you want to use the certificate.html file.
The certificate.html page contains JavaScript code that says to get a variable called learner from storyline and display it in certificate.html. The variable "learner" is just a text entry field in the .storyline file. When you add a text entry field to a screen in Storyline, it is given a default variable name, TextEntry, TextEntry1, TextEntry2 etc so that each one has a unique name.
You can change the name of these default variable names to give them more meaningful names - that is what Steve did in his example. In his .story file, he changed the name of Text Entry field to learner.
So in your course, you need to add a text entry field where the user can enter his or her name. This will have a default name like I just mentioned. So now you have 2 options, you change the variable name of the text entry field you created to learner, or you can edit the certificate.html file (using notepad like Dave suggests) and change the learner to TextEntry or whatever the default name is for the text entry field you created.
Sorry, this is a little long winded but I hope it helps.
- DanielDavidCommunity Member
Thank you Dave & Nancy,
It is a lot clearer now. I changed the file name to match what the .html refers to.
I published the file to LMS and copied the files in the published output directory. I have made the changes about the learner name, but now how do I uploaded it to Articulate Online? Online only accepts one file so now I have to change this Published output directory and all it's content into one file that Articulate Online accepts or SL opens.
- NancyWoinoskiSuper Hero
Hi Daniel - I think you just have to zip the published output directory and upload the zipped file to Articulate Online.
- SteveFlowersCommunity Member
For Articulate Online, you can either use the direct publish option or configure SL to enable manual upload. This will generate a .SL file. Change the extension to .ZIP, unzip it. Then do your magical surgery magic (add your post publish files). Then rezip, change the extension back to .SL. Manually upload this package to AO and Bob's your uncle.
- DanielDavidCommunity Member
I will do that.
Thank you once again for your help.
I have found an other way to work this out, so once I put together a step by step guide I will test it and post the guide here. Hopefully by the end of today.
Related Content
- 2 months ago