Learner Score and Date on Certificates

Apr 04, 2014

Hi I have been reading all the threads I can find on certificates and have made some progress, however I am still having problem with getting the current date to display and the learner's assessment score. I have two problems:

  • The score shows fine on the e-learning page but my html is obviously not drawing it into the certificate.
  • The current date is not displaying in the e-learning. I've tried putting the javascript for date into the results page "%SystemDate%", with the variable as explained on the Articulate site, but it's not displaying.
  • I've tried doing the date a different way by putting in the html certificate document, but that doesn't work either.

I'm not very experienced at coding so I've probably made some fundamental errors. Here is my certificate.html content:

<!DOCTYPE HTML>
<HTML>
<HEAD>
<!-- saved from url=(0014)about:internet -->
<TITLE>Certificate</TITLE>
<STYLE>

.result {
    position:absolute;
        text-align:center;   
        left:405px;
    top:380px;
    width:360px;
    font-family:Arial, Helvetica, sans-serif;
    font-size:40px;
        color:#cc00ff;
    z-index:2;
}

.bgimage{
    position:relative;
    z-index:1;
}

</STYLE>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</HEAD>
<BODY>

<a href="javascript:window.print()">Print This Page</a>

<p>  </p>

<div class='bgimage'><img src='certificateBG.gif'/></div>

<p>  </p>

<SCRIPT>
    //this grabs the player object from the parent (launching window)
    var player=window.opener.GetPlayer();
    //now we pull a field value. You can pull as many as you like. That replace jumble lets you bring over text fields with multiple lines.
    var learnerName=player.GetVar("TextEntry1").replace(/(\r\n|\r|\n)/g, '<br />');
    document.write("<div class='result'>"+learnerName+" </div>");
       
        var learnerScore=player.GetVar("Results1.scorePercent");
        document.write(learnerScore);

        var day = currentTime.getDate()       
        var month = currentTime.getMonth() + 1
        var year = currentTime.getFullYear()
        document.write(day + "/" + month + "/" + year);

</SCRIPT>
</BODY>
</HTML>

Any help will be greatly appreciated.

Be the first to reply

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