Print Completion Certificate at the end of course in Storyline
Nov 01, 2021
I need to publish the attached storyline course to web (not LMS) and have created the last slide to be a Certificate of Completion that includes the username (entered via variable text in earlier slide).
I desperately need help as I cannot work out how to;
- Get variable for SystemDate working (i'm using the following Execute JavaScript when the timeline starts on last slide):
var m_names = new Array("January", "February", "March",
"April", "May", "June", "July", "August", "September",
"October", "November", "December");
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth();
var yyyy = today.getFullYear();
if(dd<10) { dd='0'+dd }
var date= dd+' '+m_names[mm]+', '+yyyy;
var player = GetPlayer();
player.SetVar("SystemDate",date);
2) 'Print' the last slide so ONLY the certificate with variable text is shown. Currently using window.print() but its not working??
3) Have NO IDEA how to setup a script to email a pdf of the last page (the certificate that has the variables populated), whereby the email address comes from a user-entered text variable??
Any assistance would be beyond appreciated!
2 Replies
Hi Pilita,
I'm brand new to all this and don't know much about including JavaScript into a Storyline 360 course (still learning about it), but just looking at the syntax, I would say it looks like there's a semicolon missing from the "if" statement line. Don't know if that helps, but I hope so.
~ Ricardo
Hi Pilita,
I was also unable to generate a certificate. My workaround, on our non-LMS website, is to have a fillable PDF available that the user can open by clicking a button on the final screen. They enter their own name and then either save or print the certificate.
This is not a good option if you require accurate tracking or you want to ensure only users who actually took the course can print a certificate. However, if you need something quick this might work for you.