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.
- AshutoshMauryaCommunity Member
Thanks Steve for wonderful certificate generator.
Is there a way we can add today's date in the certificate?
Thanks.
- AshleyWCommunity Member
By using this code:
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();
if(dd
document.write(today);
I managed to get the date to appear. Now the problem is, it's appearing instead of the background.
I'm very new to scripts, anyone know if there's a way these two things can live in harmony? - JustinPilleCommunity Member
This is working for me in the HTML5 output even though it isn't supposed to. Maybe due to the recent update?
- SteveFlowersCommunity Member
Hey, Justin -
Yeah. Recent updates made the JavaScript player methods work just like the Flash methods.
- Anthony-CottrelCommunity Member
Hi Steve,
@Peter Anderson pointed me in your direction to create a Completion Certificate.
Many thanks ... I've got it all up and running and a last have a great looking certificate to offer.
I am not terrific at code but managed to get everything looking perfect.
I was playing around with how I can get something included in the "certificate.html" that allows me to also place the current date in the correct position on the certificate.
I know this must be easy as well now.. but I have tried playing around with the header and body etc for a few hours. I can get the date to show but not formatted or in the correct position. I've obviously missed something in the script or style. If you've got any nuggets of info for this one in regards to code that I need to place in the head and body... that would place the finishing touches for me.
Again, thank you for providing the solution to an issue that has been bugging me for weeks
Cheers
- TomWashamCommunity Member
Hi Anthony,
I recently started working on this certificate and stumbled upon a solution to the date position on the certificate. I have limited knowledge of html, but I was able to wrap the script inside a div tag which uses absolute positioning ( .time). I was also able to use the same logic to center the learners name on the certificate. Hopefully you can get some use out of these attachments.
Tom
- Anthony-CottrelCommunity Member
THANK YOU TOM !!!!
You've made my day...It worked a treat.
I really appreciate you sharing this info. You have been most helpful.
KIndest regards
Anthony
- AliceWongCommunity Member
Hi Steve, I have also followed your instructions and placed the certificate files inside the Published folder which was then uploaded to the Moodle server using LMS. However, I only got the text " - you have passed The Grueler!For that feat, you deserve a break. Take 30 seconds. Then get back ', but the name and the graphics did not show up. Any ideas how to get it to work? Any directions will be appreciated. Thanks
- MarieAnthonyCommunity Member
Is this in the progress of being fixed? I have produced a lot of courses in storyline and now I am finding out I cannot publsih these with a certificate of completion! What is being done to correct this????
I look forward hearing a solution as I have around 20 continuing education courses that need to be published with a certificate of completion attached as a requirement?
I am at loss!!!!
Thanks for your reply.
- SteveFlowersCommunity Member
Hi, Alice -
Did you create the variables within Storyline that the certificate is pulling?
Hi, Marie -
What kind of problems are you running into? The method above works for me.