Certificate does not bring name and date please help!!!!!!!!

Certificate does not bring name and date please help!!!!!!!!

by ebru heyberi tenekeci -
Number of replies: 1

I am the member of Moodle community.

I am new in Moodle and I have to produce a certificate at the end of the course without having quiz. We are preparing courses in articulate. Course has couple of quizzes through the course but they do not get certificate as teacher want them to get certificate at the last page if they pass all quizzes and go through courses. I prepared a last page in power point and design it in articulate quiz maker something like a quiz but they can skip this and they can press print result button to get certificate. As we want our logo as well I looked online and they normaly change report.html file to change its appearance I tried as well logo is coming but students name and other writings such as ' this certify  that:' not coming I attached my code.

 Or is there any other way of having certificate without me designing a page in quizemaker??? but I need name of the students and date of their acces and like aproper certificate..

Is there any way that can you help me. 

 I have to sort this out in 3-4 days and I could not find a way to a certificate which get the name of the students from system as they log in with their username. 


If you can help me I will be very very appreciated.


here is my code. I do not know why.. 

<HTML>

<HEAD>

<!-- saved from url=(0014)about:internet -->

<TITLE>Results</TITLE>


<SCRIPT>

var g_arrMonths = new Array()


// Enter the month names below

g_arrMonths[0] = "January"

g_arrMonths[1] = "February"

g_arrMonths[2] = "March"

g_arrMonths[3] = "April"

g_arrMonths[4] = "May"

g_arrMonths[5] = "June"

g_arrMonths[6] = "July"

g_arrMonths[7] = "August"

g_arrMonths[8] = "September"

g_arrMonths[9] = "October"

g_arrMonths[10] = "November"

g_arrMonths[11] = "December"


// Enter the column headers

var g_strDateTime = "Date / Time"

var g_strStudentScore = "Student Score"

var g_strPassingScore = "Passing Score"

var g_strResult1 = "Result"

var g_strQuestion = "Question"

var g_strCorrectAns = "Correct Answer"

var g_strResult2 = "Result"

var g_strStudentAns = "Student Answer"

var g_strPointsAwarded = "Points Awarded"

var g_strNeutral = "Neutral"

var g_strCorrect = "Correct"

var g_strIncorrect = "Incorrect"


</SCRIPT>


<STYLE>


TD {

font-size:10pt;

font-family:arial;

text-align: center;

width: 12.5%;

}


.CORRECT {

font-size:10pt;

font-family:arial;

color: #008800;

}


.INCORRECT {

font-size:10pt;

font-family:arial;

color: #880000;

}


.NEUTRAL {

font-size:10pt;

font-family:arial;

color: #000088;

}


.QUESTION {

font-size:10pt;

font-family:arial;

text-align: left;

width: 46.25%;

}


.NUMBER {

font-size:10pt;

font-family:arial;

text-align: center;

width: 3.75%;

}


.DATE {

font-size:10pt;

font-family:arial;

text-align: center;

}


.DATETIME {

font-size:10pt;

font-family:arial;

margin-top: 0;

margin-bottom: 0;

}


.SUMMARY {

font-size:10pt;

font-family:arial;

text-align: center;

}


H1 {

font-size:14pt;

font-family:arial;

text-align: center;

}


H2 {

font-size:14pt;

font-family:arial;

text-align: center;

}


TH {

font-size:12pt;

font-family:arial;

}


</STYLE>


<SCRIPT>

var g_arrResults = window.opener.g_arrResults

var g_oQuizResults = window.opener.g_oQuizResults;


function AddItem(nIdx)

{

var strResult = g_strIncorrect;

var strClass = "INCORRECT";

var strCorrectResponse = "&nbsp;";

var strStudentResponse = "&nbsp;";


if (g_arrResults[nIdx].strCorrectResponse)

{

strCorrectResponse = g_arrResults[nIdx].strCorrectResponse;

strCorrectResponse = strCorrectResponse.replace(/\|#\|/g,",");

}


if (g_arrResults[nIdx].strStudentResponse)

{

strStudentResponse = g_arrResults[nIdx].strStudentResponse;

strStudentResponse = strStudentResponse.replace(/\|#\|/g,",");

}


document.write("<TR>");

document.write("<TD class='NUMBER'>" + g_arrResults[nIdx].nQuestionNum + "</TD>");

document.write("<TD class='QUESTION'>" + g_arrResults[nIdx].strQuestion + "</TD>");

document.write("<TD>" + strCorrectResponse + "</TD>");

document.write("<TD>" + strStudentResponse + "</TD>");


if (g_arrResults[nIdx].strResult == "correct")

{

strResult = g_strCorrect;

strClass = "CORRECT"

}

else if (g_arrResults[nIdx].strResult == "neutral")

{

strResult = g_strNeutral

strClass = "NEUTRAL"

}


document.write("<TD class='" + strClass + "'>" + strResult + "</TD>");

document.write("<TD>" + g_arrResults[nIdx].nPoints + "</TD>");

document.write("</TR>");

}


function FormatDate(dtmDate)

{

var strResult = "";

var nHours = dtmDate.getHours();

var strAM = "am";

var nMinutes = dtmDate.getMinutes();

var strMinutes = "" + nMinutes;


if (nMinutes < 10)

{

strMinutes = "0" + nMinutes;

}


if (nHours == 12)

{

strAM = "pm";

}


if (nHours > 12)

{

nHours -= 12;

strAM = "pm";

}


strResult += "<P class='DATETIME'>"

strResult += g_arrMonths[dtmDate.getMonth()] + " ";

strResult += dtmDate.getDate() + ", ";

strResult += dtmDate.getFullYear() + "  ";

strResult += "</P><P class='DATETIME'>"

strResult += nHours + ":";

strResult += strMinutes + " ";

strResult += strAM;

strResult += "</P>"

return strResult;

}


</SCRIPT>


</HEAD>

<BODY><center>

<img src="quizimages/certificateofcompletion.png">

</center>

<p>

<SCRIPT>

var strTitle = g_oQuizResults.strTitle;


if (g_oQuizResults.oOptions.strName)

{

if (g_oQuizResults.oOptions.strName.length = 0)

{

document.write("<CENTER><I><P><H3>This certifies that:</I></CENTER>");

document.write("<P><H2>" + g_oQuizResults.oOptions.strName + "</H2></P>");

document.write("<CENTER><I><P><H3>Has completed</I></CENTER>");

document.write("<P><H1>" + strTitle + "</H1></P>");

document.write("<CENTER><I><P><H3>Date of complition:</I></CENTER></H3>");

document.write("<CENTER><H1>" + FormatDate(g_oQuizResults.dtmFinished) + "</CENTER></H1>);


}

}

</SCRIPT>



</BODY>

</HTML>


Average of ratings: -
In reply to ebru heyberi tenekeci

Re: Certificate does not bring name and date please help!!!!!!!!

by Peter Bowen -

I think you are going about it the wrong way.

Certificate is a plugin which will give you all this - the report.html is purely within the SCORM package, and I don't know that it pulls anything from within moodle.

If you put a certificate on the course, and it's entry requirements are that you pass the SCORM, then this will work.

Cheers

Peter