Certificate of Completion - Help Needed

Aug 07, 2018

Hello All,

I am trying to create a certificate of completion for a course that will be published to web.  When printing the cert, I only want the system to print the cert and nothing else.  I've added in a couple execute triggers to include name, title, and date but when I go to print, nothing happens.  The course does not contain a quiz.  What am I doing wrong?  Thanks for your help!

2 Replies
Russell Killips

I could see that your javascript was missing some closing brackets and semicolons.

After publishing, don't forget to include your printCertificate.html file in the published folder.

Here is the updated javascript code for your print button:

var player = GetPlayer();

var theName =(player.GetVar("NameField"));

var theDate =(player.GetVar("DateValue"));

var urlstring = ("printCertificate.html?print=" + theName + "&" + theDate);

window.open(urlstring,"_blank","width=800,height=600,menubar=no");

window.print();

 

And here is the javascript code for Timeline start.

var currentDate = new Date();
var day = currentDate.getDate();
var month = currentDate.getMonth() + 1;
var year = currentDate.getFullYear();
var player = GetPlayer();
var newName = month + "/" + day + "/" +year;
player.SetVar("DateValue", newName);

This discussion is closed. You can start a new discussion or contact Articulate Support.