Custom Report .html Not Working in Chrome html5

Hello All,

I have recently inherited some Storyline presentations that include an "assessment" with a custom results page at the end that gives feedback based on the users' answers to the questions. It currently functions fine in IE and Flash so it appears to be an html5 issue. I previously posted on this forum because I wasn't seeing anything in Chrome but now I am at the point where the presentation and assessment work fine it's just the custom report.html file at the end that isn't working. From what I have read on this forum this doesn't seem to be a function supported by Articulate so I am hoping a fellow user may be able to assist me :).

More details: I have published the story in versions 2, 3, and 360 and the results are the same. 

Errors I am getting in Chrome when I F12 the report.html file:

Uncaught TypeError: Cannot read property 'strMainQuizId' of undefined
at report.html:346
report.html:377 Uncaught TypeError: Cannot read property 'bShowQuizReview' of undefined
at report.html:377

Here is the coding behind the report.html file:

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

<SCRIPT>
var g_arrMonths = new Array()

// Enter the month names below
try
{
g_arrMonths[0] = __MONTH_JAN__;
g_arrMonths[1] = __MONTH_FEB__;
g_arrMonths[2] = __MONTH_MAR__;
g_arrMonths[3] = __MONTH_APR__;
g_arrMonths[4] = __MONTH_MAY__;
g_arrMonths[5] = __MONTH_JUN__;
g_arrMonths[6] = __MONTH_JUL__;
g_arrMonths[7] = __MONTH_AUG__;
g_arrMonths[8] = __MONTH_SEP__;
g_arrMonths[9] = __MONTH_OCT__;
g_arrMonths[10] = __MONTH_NOV__;
g_arrMonths[11] = __MONTH_DEC__;

// 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_ANS__;
var g_strResult2 = __RESULT__;
var g_strStudentAns = __STUDENT_ANS__;
var g_strPointsAwarded = __POINTS_AWARD__;
var g_strNeutral = __NEUTRAL__;
var g_strCorrect = __CORRECT__;
var g_strIncorrect = __INCORRECT__;
}
catch(e)
{
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 = "Your Answer";
var g_strPointsAwarded = "Points Awarded";
var g_strNeutral = "Neutral";
var g_strCorrect = "Correct";
var g_strIncorrect = "Incorrect";
}

</SCRIPT>

<STYLE>
body {
color: #5d6166;
font-size: 12px;
font-family:arial;
text-align: left;
}

img {
float:left;
padding:0 15px 0 0;
}

#logo
{
position: relative;
top: 15px;
}

TABLE.SUMMARY {
width: 100%;
margin-left: auto;
margin-right: auto;
border-width: 1px;
border-spacing: 0;
border-collapse:collapse;
}
TABLE.QUESTIONS {
width: 100%;
margin-left: auto;
margin-right: auto;
border-width: 1px;
border-spacing: 0;
border-collapse:collapse;
}
/*TD {
font-size:10pt;
font-family:arial;
text-align: left;
padding: 5px 5px 5px 5px;
}*/
td
{
padding: 4px 2px 2px;
color: #5d6166;
text-align: left;
margin: 0;
line-height: 16px;
font-size: 12px;
}
/*TH {
font-size:12pt;
font-family:arial;
text-align: left;
}*/
th
{
text-align: left;
padding: 8px 12px 7px;
color: #5d6166;
font-weight: bold;
}

.CORRECT {

font-family:arial;
color: #008800;
padding: 5px 5px 5px 5px;
}

.INCORRECT {

font-family:arial;
color: #880000;
}

.NEUTRAL {

font-family:arial;
color: #000088;
}

.QUESTION {

font-family:arial;
text-align: left;
width: 65%;
}

.ANSWER {

font-family:arial;
text-align: left;
width: 30%;
}

.NUMBER {

font-family:arial;
text-align: center;
}

.DATE {

font-family:arial;
}

.DATETIME {

font-family:arial;
margin-top: 0;
margin-bottom: 0;
width: 25%;
}

.SUMMARY {

font-family:arial;
text-align: left;
}

H1 {
font-size:14pt;
font-family:arial;
text-align: center;
font-weight: normal;
}

H2 {
font-size:14pt;
font-family:arial;
text-align: center;
font-weight: normal;
}

H3
{
font-size: 12px;
}

li{
padding-bottom:5px;
}

</STYLE>

<SCRIPT>
var g_oContentResults = window.opener.g_oContentResults;
var g_listQuizzes = window.opener.g_listQuizzes;
var g_oPrintOptions = window.opener.g_oPrintOptions;
function WriteQuizResults(strQuizId)
{
var oQuiz = g_listQuizzes[strQuizId];
//document.write("<h3>" + oQuiz.strQuizName + "</h3>");
document.write("<TABLE class='QUESTIONS' BORDER=1>");
document.write("<TR>");
document.write("<TH class='NUMBER'>#</TH>");
document.write("<TH>" + g_strQuestion + "</TH>");
document.write("<TH>" + g_strStudentAns + "</TH>");
document.write("</TR>");
// Sort our questions by question number
var arrSort = new Array();

var arrQuestions = oQuiz.arrQuestions;

if (arrQuestions.length > 0)
{
if (arrQuestions[0].bFound)
{
for (var i = 0; i < arrQuestions.length; i++)
{
arrQuestions[i].bFound = false;
}
}

for (var i = arrQuestions.length - 1; i >= 0; i--)
{
var nIndex = -1;
var nMaxValue = -1;
for (var j = 0; j < arrQuestions.length; j++)
{
if (!arrQuestions[j].bFound && Number(arrQuestions[j].nQuestionNumber) > nMaxValue)
{

nMaxValue = arrQuestions[j].nQuestionNumber;
if (nIndex >= 0)
{
arrQuestions[nIndex].bFound = false;
}
arrQuestions[j].bFound = true;
nIndex = j;
}
}
arrSort[i] = nIndex;
}

for (var i = 0; i < arrSort.length; i++)
{
AddItem(arrQuestions[arrSort[i]]);
}
}
document.write("</TABLE>");
}

function AddItem(oQuestion)
{
var strResult = g_strIncorrect;
var strClass = "INCORRECT";
var strCorrectResponse = "&nbsp;";
var strUserResponse = "&nbsp;";

if (oQuestion.strCorrectResponse)
{
strCorrectResponse = oQuestion.strCorrectResponse;

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

if (oQuestion.strUserResponse)
{
strUserResponse = oQuestion.strUserResponse;
strUserResponse = strUserResponse.replace(/\|#\|/g,", ");
}

document.write("<TR>");
document.write("<TD class='NUMBER'>" + oQuestion.nQuestionNumber + "</TD>");
document.write("<TD class='QUESTION'>" + oQuestion.strDescription + "</TD>");
document.write("<TD class='ANSWER'>" + strUserResponse + "</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>"
strResult += g_arrMonths[dtmDate.getMonth()] + " ";
strResult += dtmDate.getDate() + ", ";
strResult += dtmDate.getFullYear() + " ";
strResult += "</P><P>"
strResult += nHours + ":";
strResult += strMinutes + " ";
strResult += strAM;
strResult += "</P>"
return strResult;
}

</SCRIPT>

</HEAD>
<BODY>
<img id="logo" src="logo.png" />
<SCRIPT>
var strTitle = g_listQuizzes[g_oPrintOptions.strMainQuizId].strQuizName;
var g_strSummary = window.opener.g_strSummary;

document.write("<P><H1 class='text-align: center;'>" + strTitle + "</H1></P>");
if (g_oPrintOptions.strName)
{
if (g_oPrintOptions.strName.length > 0)
{
document.write("<P><H2 class='text-align: center;'>" + g_oPrintOptions.strName + "</H2></P>");
}
}

document.write("<P style='margin-bottom: 0;'>&nbsp;</P>");
document.write("<TABLE class='SUMMARY' border=1>");
document.write("<TR>");
document.write("<TH>" + g_strDateTime + "</TH>");
if (g_strSummary != null && g_strSummary != undefined && g_strSummary.length > 0) {
document.write("<TH>Summary</TH>");
}


document.write("</TR><TR>");
document.write("<TD class='DATETIME'>" + FormatDate(g_oContentResults.dtmFinished) + "</TD>");
if (g_strSummary != null && g_strSummary != undefined && g_strSummary.length > 0) {

document.write("<TD class='SUMMARY'>" + g_strSummary + "</TD>");
}
document.write("</TR></TABLE>");
</SCRIPT>
<P style='margin-top: 0;'>&nbsp;</P>
<SCRIPT>
if (g_oPrintOptions.bShowQuizReview)
{
var arrQuizzes = g_oPrintOptions.arrQuizzes;
// for (strQuizId in g_listQuizzes)
for (var i = 0; i < arrQuizzes.length; i++)
{
WriteQuizResults(arrQuizzes[i]);
}
}

</SCRIPT>
<P style='margin-top: 0;'>&nbsp;</P>
<script>
var g_oRecommendations = window.opener.g_oRecommendations;
// Recommendations
if (g_oRecommendations != null && g_oRecommendations != undefined && g_oRecommendations.length > 0) {
document.write("<H3>Recommendations</H3>");
document.write("(Recommendation number corresponds with the question numbers above)")
document.write("<ol>");
for (var i = 0; i < g_oRecommendations.length; i++) {
document.write("<li>" + g_oRecommendations[i] + "</li>");
}
document.write("</ol>");
}
</script>
</BODY>
</HTML>

Many thanks in advance!

Polly

 

3 Replies