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
No problem Erika! Did you find the answer that you were looking for?
- ErikaPCommunity Member
Yup, with the help of these links...
Great! Thanks for sharing Erika
- LisaKarpukCommunity Member
I seem to be having major issues when trying to pull any other variables from the Storyline file into the certificate.html. I have no problems when I am just using the learner variable but when I try to get the certificate to show the final mark (or anything else) from Storyline it just stops working.
I have limited knowledge of JavaScript right now, but it my head what I am doing makes sense - but it's just not working no matter what I try, and I haven't yet seen an answer on here that specfically addresses how to do this.
I attached an example. I used the storyline and certificate files provided by Steve. I added a variable that simply generates the number 85 and tried to add that to the certificate.
Any help would be appreciated!
- JeffClayCommunity Member
I'm having the same issue as Lisa. I have tried publishing both in Web and CD versions, and while my certificate window opens just fine, no matter what I do I cannot get any variable to show on the certificate. My variable names are correct, and I have background in HTML and some javascript, so I know the code is fine, however, it's just not pulling the variable. Would love a solution if anyone has one. For now, the learners have to print the certificate and fill the name in themselves.
- PalaniVeluCommunity Member
Hi,
Thanks for your guidance to print a certificate.
It's working fine when I tried on my local system.
But, when attempting to do this from the LMS using Firefox/Chrome it is displaying an error.(Please refer 3rd image)
For your reference am attaching the screnshots.
Please give a solution on how to solve this.
Certificate Files pasted
Published file from Local System
MOODLE Output
Regards,
Palani Velu
- SeanSpeakeCommunity Member
Further question...
I'm 99% sure I can get the certificate to work as advertised.
My HTML days are far, far behind me. Is there a way to embed a link into the certificate that will email the entire certificate page to a pre-populated address?
- Manjeet-RandhawCommunity Member
Hi Steve:
I was able to replicate what you did but, I've been playing around the code in "certificate.html" in the add-in files.and have been trying to add the learner's final score and the systemDate into the code. I cannot seem to pull that data into the code.Can you help with what that looks like?
Thanks
- RogerHoCommunity Member
Jeff Clay said:
I'm having the same issue as Lisa. I have tried publishing both in Web and CD versions, and while my certificate window opens just fine, no matter what I do I cannot get any variable to show on the certificate. My variable names are correct, and I have background in HTML and some javascript, so I know the code is fine, however, it's just not pulling the variable. Would love a solution if anyone has one. For now, the learners have to print the certificate and fill the name in themselves.
I'm running into the same problem. I used the files that Steve posted (not the dropbox ones) and I was able to open the file, publish the file, move the supplied folder contents to the published folders. I have published the default file to web, lms, and CD to test it and I can see the certificate.html file in story.html but I do not see it story.swf. I am unable to see the variable learner in either situation.Please help super heroes!
- KeithKemsleyCommunity Member
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.
Related Content
- 3 months ago