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
- OwenHoltSuper Hero
I have any required images or other inputs hosted on a SharePoint. The course itself is zipped and hosted in our LMS (Saba). The codes use a full path for the images and other inputs and this works just fine.
- MelissaMorri679Community Member
Hello,
I need to be able to do this on CD. How can I set it up since everything seems to be for the LMS.
Thank you,
Melissa
- OwenHoltSuper Hero
I haven't tested it, but I would assume relative links should work just as well.
- MelissaMorri679Community Member
They don't. When you publish to CD using Steve's it does not pull any of the information into it. I have attached my file.
- OwenHoltSuper Hero
I'm no expert on javascript, but you might need to investigate if there is a way to first, identify the users CD drive letter and then second, use this information to construct a hard link to the file on the disc.
Another potential use of javascript would be to assume the drive will be one of several drives (i.e. D:, E:, F:, G
and then check each for your file path, ignoring any that are not a match or that return a null result. Once you have a match, you have the path to use to the graphics for your certificate.
Steve is great at javascript challenges like this; you might consider sending him a direct message.
- MelissaMorri679Community Member
Thank you Owen. I'm not a scripting person either.
I sent Steve an email yesterday and I am waiting to hear back.
- MelissaMorri679Community Member
Even when I publish to the Web, I can't get the information to pull in.
Can someone take a look at my file and let me know what I am doing wrong?
Thanks
Melissa
- YoniHCommunity Member
Keith Kemsley said:
Hi All,
CENTERING LEARNER'S NAME
I'm new to CSS/JavaScript...
With absolute positioning, I can center fixed-length information but I cannot seem to center the +learnerName+ because it is variable length. Is there a way to center the learner's name? (It doesn't have to be absolute positioning. That's just what the sample file seems to use.)
Thanks in advance for any code help on this!!!!
p.s. I did put in the requisite 3 hours of work before bothering y'all with this.
@Keith Kemsley
position: absolute;
left: 0px;text-align:center;width:100%;This works to make my text centered regardless of the text length.Good luck. - MihaiHorgaCommunity Member
Thank you Steve for the solution to generate a certificate for printing.
Does this solution work with a story published for CD? In other words, can a user which has only the CD published version, with no browser an no Internet connection print his/her certificate?
Also, it would be good for the user to be able to save the certificate as a pdf file for later (re)printing. Is there any way to generate and save a pdf certificate from a CD published version?
Thanks,
Mihai
Related Content
- 3 months ago