\n"); if ((showReport==1)&&(dhtmlEnabled==1)) { doc.writeln("
\n"); doc.writeln("\n"); doc.writeln("
Quiz Result\n"); doc.writeln("PRINT | \n"); if (man_repeat) doc.writeln("REPEAT | \n"); if (topChartFile!='') doc.writeln("Top Chart | \n"); doc.writeln("QUIT\n"); doc.writeln("

\n"); } doc.writeln("
"); doc.writeln("
"); doc.writeln(""); doc.writeln(" "); if (identityName!="") { doc.writeln(""); doc.writeln(" "); } doc.writeln(""); doc.writeln(" "); doc.writeln(""); doc.writeln(" "); doc.writeln(""); doc.writeln(" "); if (maxtime>0) { doc.writeln(""); doc.writeln(" "); } doc.writeln(""); doc.writeln(" "); doc.writeln(""); if (computeMarkErr==0) doc.writeln(" "); else doc.writeln(" "); doc.writeln("
"); doc.writeln(""); doc.writeln("
"+parent.quizTitle+"
  Number of questions :     "+(questions-invisibleQuests)+"  
  Candidate name     "+identityName+"  
  Right Answers    "+nc+"  
  Wrong Answers    "+ns+"  
  Unmarked questions :     "+falseQuests+"  
  Time elapsed :     "+getTimeString(deltatime)+"  
  Date :     "+parent.DataToStringa()+"  
  MARK    "+voto+"/"+maxvoto+"  
  No mark  
"); } function checkRisposta(checkBox,risp,n) { if ( ((checkBox.checked==true) && (parent.isRightAns(n,risp)==1)) || ((checkBox.checked==false) && (parent.isRightAns(n,risp)==0)) ) return 1; return 0; } function checkRispostaBooleana(radioBox,risp,n) { if ( ((radioBox[0].checked==true) && (risp[n]==1)) || ((radioBox[1].checked==true) && (risp[n]==0)) ) return 1; return 0; } function checkTrueOrFalse(radioBox) { if ( (radioBox[0].checked==false) && (radioBox[1].checked==false)) return 0; return 1; } function IncompletedQuest() { window.alert("The answer is incompleted. Please, choose all the items"); } function AnsReport(choice,value,rem,data) { this.choice = choice; this.valuation = value; this.remark = rem; this.data = data; } function getListOfRightAns(n) { var j,value,msg=''; for (j=0;j0) msg += Lettera(j)+' '; } return msg; } function getNumOfRightAns(n) { var j,value,num=0; for (j=0;j0) num++; } return num; } function getListOfSelAns(n) { var j,value,msg=''; if (typeOfQuest[n]==3) { return allAnsReport[n][0].choice; } for (j=0;j0)&&(choice==1)) || ((value<0)&&(choice==0))) return 1; return 0; } function getScore(n) { var j,choice,value,data, score=0,nchoice=0; for (j=0;j=0; i--) { if (str.charAt(i)!=' ') break; } iStop = i; if ((iStart!=0)||(iStop!=str.length-1)) return str.substring(iStart,iStop+1); return str; } function getGuessFillGapN(n,m) { var i,j,value,choice; var str1,str2; choice = allAnsReport[n][m].choice; value = allAnsReport[n][m].valuation; str1 = trim(choice.toLowerCase()); for (i=0; i
"); for (k=0;k\n"); } if ((k==0)&&(ncols_report>=2)) { documento.writeln("
\n"); } if ((k==half_index)&&((ncols_report==2)||(ncols_report==4))) { documento.writeln(""); } if (ncols_report==3) { if ((k==index13)||(k==index23)) { documento.writeln(""); } } if (ncols_report==4) { if ((k==index14)||(k==index34)) { documento.writeln(""); } } i = ordineDomande[k]; if (valid[i]==4) continue; documento.writeln(""+n+" "+qstHead[i]+"
"); n++; documento.writeln(""); if (valid[i]==1) documento.writeln("Correct answer
"); else if (valid[i]==-1) documento.writeln("Wrong answer
"); else if (valid[i]==2) documento.writeln("Question not valuated
"); else if (valid[i]==3) { if (typeOfQuest[i]==2) documento.writeln("Right sentences "+nScore[i]+" on "+maxScore[i]+"
"); else if (typeOfQuest[i]==4) documento.writeln("Guess words "+nScore[i]+" on "+maxScore[i]+"
"); else if (typeOfQuest[i]==5) documento.writeln("Matching "+nScore[i]+" on "+maxScore[i]+"
"); } else if (valid[i]==5) { documento.write("scores "+nScore[i]); if (groups[i]==0) documento.writeln(" (MARK "+maxScore[i]+")
"); else if (groups[i]==1) documento.writeln("
Scores added with the previous question
"); else if (groups[i]==2) documento.writeln("
MARK (computes from the sum of scores of next questions): "+maxScore[i]+"
"); } documento.writeln("
"); if (valid[i]==2) { documento.write("

"+allAnsReport[i][0].choice+"

"); continue; } documento.writeln("
"); documento.writeln(""); for (j=0;j"); else documento.write(" "); documento.write(""); choice = allAnsReport[i][j].choice; if (typeOfQuest[i]==2) { documento.write(""); else documento.write(""); documento.write(""); else documento.write(""); } else if (typeOfQuest[i]==4) { if (getGuessFillGapN(i,j)) documento.write(""); else { documento.write(""); else if (m==0) { documento.write(""); else documento.write(""); } documento.writeln(""); } documento.writeln("
"); documento.write(Lettera(j)); documento.write(" V "); if (choice==1) documento.write(" F "); if (choice==0) documento.write(""+choice+""+choice+" "); for (l=0; l"); } } else if (typeOfQuest[i]==5) { m = getGuessMatchN(i,j); if (m==1) documento.write(""+choice[0]+" - "+choice[1]+""+choice[0]+" - "); documento.write(""+choice[1]+""); documento.write(" "); for (l=0; l"); } else { documento.write(""+choice[0]+" - "+choice[1]+""); } } else { if (choice==1) documento.write(""); if (valid[i]==5) { value = allAnsReport[i][j].valuation; data = allAnsReport[i][j].data; documento.write(" ("+value+") "); if (data!=0) documento.write(" ("+data+") "); } if (choice==1) documento.write(allAnsReport[i][j].remark); documento.writeln("

"); } documento.writeln("
"); } function init_IntArray(n) { var i; this.length=n; for (i=0; i"); doc.writeln(""); doc.writeln(""); doc.writeln(""); doc.writeln(""); } } function getSelezione(obj) { var i; for (i=0; i255)) return "NULL"; car = '%'+dec_to_hex(n); return unescape(car); } function DecodeString(msg) { var i,j,n; var decode_msg=""; var num; var car; n = keyword.length; j=0; for(i=0;i127)) { PrintWrongKeyword(); return ""; } car = '%'+dec_to_hex(num); decode_msg+=unescape(car); j++; } return decode_msg; } function DecodeNumber(i,n,minNum,maxNum) { var num,lung; lung = keyword.length; num=i-keycode[n%lung]; if ((nummaxNum)) PrintWrongKeyword(); return num; } function CodeString(msg) { var i,n; var code_msg=""; var c=0; n = keyword.length; for (i=0;i127) c = 127 + keycode[i%n]; else c = ASCIItoInt(msg.charAt(i)) + keycode[i%n]; if (c<10) code_msg += " "+c; else if (c<100) code_msg += " "+c; else code_msg += ""+c; } return code_msg; } function MakeKeyCode() { var i,num; var car; for (i=0;i='a')&&(car<='z')) { keycode[i]=num-97; continue; } if ((car>='A')&&(car<='Z')) { keycode[i]=num-65; continue; } keycode[i]=0; } } function GetSoundName(n) { if ((valid[n]==-1)||(maxScore[n]==minvoto)) return parent.errSound; if ((valid[n]==1)||(maxScore[n]==maxvoto)) return parent.okSound; if ((valid[n]==3)||(valid[n]==5)) return parent.warnSound; return parent.warnSound; } function Timer() { var delta; if (ctmnow) { clearTimeout(ctmnow); ctmnow=0; } cnewdt = new Date(); time = Math.floor(cnewdt.getTime()/1000); delta = maxtime-(time-oldtime); if ((end_test==0)&&(oldtime!=time)) SetClock(getTimeString(delta)); if ((delta<=0)&&(end_test==0)) { window.alert("The time is over!"); end_test=1; EndQuiz(); } ctmnow=setTimeout("Timer()",1000); } function PrintOpenAnswer(n,outMsg) { outMsg.value = "Answer completed"; end_test = CountAnswers(); PrintStatusBar(); PrintBottomFrame(); if (end_test==1) { window.status = ""; window.alert("You have answered to all questions"); EndQuiz(); } return end_test; } function PrintBooleanAnswer(n,textField) { var msg,msg2,msgFormat; var explan= new initOneElementVector(); explan[0] = ""; if (silent==0) { msg = "Right Answers " + nScore[n] + " / " + getNumAns(n); textField.value = msg; msgFormat = "" + msg + ""; if (nScore[n]"; } PrintAnswerOnTopFrame(msg,explan,GetSoundName(n)); } end_test = CountAnswers(); PrintStatusBar(); PrintBottomFrame(); if (end_test==1) { window.status = ""; window.alert("You have answered to all questions"); EndQuiz(); } return end_test; } function PrintQuestionScore(n,textField) { var msg,msgFormat; var explan = new initListOfRemark(n); if (silent==0) { msg = "Score : " + nScore[n]; if (groups[n]==0) msg += " (MARK "+maxScore[n]+")"; textField.value = msg; msgFormat = "" + msg + ""; if (getGuessAns(n)"); parent.frames[2].document.writeln ("
"); if (maxtime>0) { parent.frames[2].document.writeln (""); } else { parent.frames[2].document.writeln (""); } if (silent==0) { msg=""; msg+=""; msg+=""; } else { msg=""; } if (quizRetire==1) msg+=""; else msg+=""; parent.frames[2].document.writeln (msg+"
right : "+nc+"wrong : "+ns+"to do : "+nr+"to be answered :"+nr+"
"); parent.frames[2].document.close(); } function PrintWrongKeyword() { parent.frames[0].document.clear(); PrintOpenHTML(0,"",1); parent.frames[0].document.writeln (""); parent.frames[0].document.writeln (""); parent.frames[0].document.close(); parent.frames[1].document.clear(); parent.frames[1].document.open(); PrintOpenHTML(1,"",1); parent.frames[1].document.writeln (""); parent.frames[1].document.writeln("
Watch out!
"); parent.frames[1].document.writeln ("The keyword isn't correct
"); parent.frames[1].document.writeln ("Unable to continue the quiz
"); parent.frames[1].document.writeln ("For information, contact the quiz's author
"); parent.frames[1].document.writeln("

"); parent.frames[1].document.writeln("

"); parent.frames[1].document.writeln (""); parent.frames[1].document.close(); PrintCopyright(0); } function PrintNoReload() { parent.frames[0].document.clear(); PrintOpenHTML(0,"",1); parent.frames[0].document.writeln (""); parent.frames[0].document.writeln (""); parent.frames[0].document.close(); parent.frames[1].document.clear(); parent.frames[1].document.open(); PrintOpenHTML(1,"",1); parent.frames[1].document.writeln (""); parent.frames[1].document.writeln("


Watch out!
"); parent.frames[1].document.writeln ("Reload of quiz is not allowed
"); parent.frames[1].document.writeln ("Unable to start the quiz
"); parent.frames[1].document.writeln ("For information, contact the quiz's author
"); parent.frames[1].document.writeln("

"); parent.frames[1].document.writeln("

"); parent.frames[1].document.writeln (""); parent.frames[1].document.close(); PrintCopyright(0); } function PrintResults() { parent.frames[1].document.close(); parent.frames[1].document.clear(); parent.frames[1].document.open(); PrintOpenHTML(1,"Quiz Result",0); parent.frames[1].document.writeln("\n"); parent.frames[1].document.writeln(""); parent.frames[1].document.writeln(""); if (valutaQuiz==1) { PrintQuizResults(parent.frames[1].document); if (showReport==1) PrintReport(parent.frames[1].document); PrintLinkBack(parent.frames[1].document); } else { parent.frames[1].document.writeln("

"); parent.frames[1].document.writeln(finalMess); parent.frames[1].document.writeln("
"); PrintLinkBack(parent.frames[1].document); } parent.frames[1].document.writeln (""); parent.frames[1].document.close(); window.status = ""; } function PrintResultOnTopFrame () { parent.frames[0].document.clear(); parent.frames[0].document.open(); PrintOpenHTML(0,"Quiz Result",1); parent.frames[0].document.writeln (""); parent.frames[0].document.writeln("
Quiz Result
"); parent.frames[0].document.writeln (""); parent.frames[0].document.writeln (""); parent.frames[0].document.close(); } function PrintCopyright(sfondo) { parent.frames[2].document.clear(); parent.frames[2].document.open(); PrintOpenHTML(2,"Info",1); if (sfondo==1) parent.frames[2].document.writeln (""); else parent.frames[2].document.writeln (""); if (printCpRg==1) { parent.frames[2].document.writeln("
"); parent.frames[2].document.writeln(""); parent.frames[2].document.writeln("This quiz was created "); if (parent.author!='') parent.frames[2].document.writeln("by "+parent.author+" "); parent.frames[2].document.writeln("with "+qmakeProgName+" "+qmakeVers+""); parent.frames[2].document.writeln ("
"); } parent.frames[2].document.writeln (""); parent.frames[2].document.close(); } function showTooltip (strTooltip) { parent.frames[0].document.clear(); PrintOpenHTML(0,"",1); parent.frames[0].document.writeln (""); parent.frames[0].document.writeln ("
"); parent.frames[0].document.writeln ("Hint:
"+strTooltip); parent.frames[0].document.writeln ("
"); parent.frames[0].document.writeln (""); parent.frames[0].document.close(); } function clearTooltip () { setTimeout(deleteTooltip,2000); } function deleteTooltip () { parent.frames[0].document.clear(); PrintOpenHTML(0,"",1); parent.frames[0].document.writeln (""); parent.frames[0].document.writeln (""); parent.frames[0].document.close(); } function RepeatQuiz() { n_repeat++; parent.frames[2].location.href = filename + '3.htm'; if (!questSlide) { parent.frames[1].location.href = filename + '1.htm'; } else { parent.frames[1].location.href = filename + 'Q1.htm'; } } function AskPrintQuiz() { if (window.confirm("Print quiz ?")) { window.print(); } } function completeInitValuate() { if (parent.frames[1].currPage==0) { if (valid[0]==0) { parent.allAnsReport[0] = new parent.frames[1].initValuate1(); parent.doValuate(0,parent.frames[1].document.domanda.score1,parent.frames[1].document.domanda.risposta1); } parent.frames[1].location.href="quiz-mediumQ2.htm" } if (parent.frames[1].currPage==1) { if (valid[1]==0) { parent.allAnsReport[1] = new parent.frames[1].initValuate2(); parent.doValuate(1,parent.frames[1].document.domanda.score2,parent.frames[1].document.domanda.risposta2); } parent.frames[1].location.href="quiz-mediumQ3.htm" } if (parent.frames[1].currPage==2) { if (valid[2]==0) { parent.allAnsReport[2] = new parent.frames[1].initValuate3(); parent.doValuate(2,parent.frames[1].document.domanda.score3,parent.frames[1].document.domanda.risposta3); } parent.frames[1].location.href="quiz-mediumQ4.htm" } if (parent.frames[1].currPage==3) { if (valid[3]==0) { parent.allAnsReport[3] = new parent.frames[1].initValuate4(); parent.doValuate(3,parent.frames[1].document.domanda.score4,parent.frames[1].document.domanda.risposta4); } parent.frames[1].location.href="quiz-mediumQ5.htm" } if (parent.frames[1].currPage==4) { if (valid[4]==0) { parent.allAnsReport[4] = new parent.frames[1].initValuate5(); parent.doValuate(4,parent.frames[1].document.domanda.score5,parent.frames[1].document.domanda.risposta5); } parent.frames[1].location.href="quiz-mediumQ6.htm" } if (parent.frames[1].currPage==5) { if (valid[5]==0) { parent.allAnsReport[5] = new parent.frames[1].initValuate6(); parent.doValuate(5,parent.frames[1].document.domanda.score6,parent.frames[1].document.domanda.risposta6); } parent.frames[1].location.href="quiz-mediumQ7.htm" } if (parent.frames[1].currPage==6) { if (valid[6]==0) { parent.allAnsReport[6] = new parent.frames[1].initValuate7(); parent.doValuate(6,parent.frames[1].document.domanda.score7,parent.frames[1].document.domanda.risposta7); } parent.frames[1].location.href="quiz-mediumQ8.htm" } if (parent.frames[1].currPage==7) { if (valid[7]==0) { parent.allAnsReport[7] = new parent.frames[1].initValuate8(); parent.doValuate(7,parent.frames[1].document.domanda.score8,parent.frames[1].document.domanda.risposta8); } parent.frames[1].location.href="quiz-mediumQ9.htm" } if (parent.frames[1].currPage==8) { if (valid[8]==0) { parent.allAnsReport[8] = new parent.frames[1].initValuate9(); parent.doValuate(8,parent.frames[1].document.domanda.score9,parent.frames[1].document.domanda.risposta9); } parent.frames[1].location.href="quiz-mediumQ10.htm" } if (parent.frames[1].currPage==9) { if (valid[9]==0) { parent.allAnsReport[9] = new parent.frames[1].initValuate10(); parent.doValuate(9,parent.frames[1].document.domanda.score10,parent.frames[1].document.domanda.risposta10); } FinalActions(); } } function ConvertPointToMark(n,points) { return 0; } function CountAnswers() { var ratio; var nexcl=0; nc = 0; ns = 0; nr = questions; for (var i=0;i=60) nc++; else ns++; } else if (valid[i]==5) { ratio = 100 * maxScore[i] / maxvoto; if (ratio>=60) nc++; else ns++; } if (valid[i]!=0) nr--; if ((valid[i]==2)||(valid[i]==4)) nexcl++; } if (nr==0) return 1; return 0; } function EndQuiz() { completeInitValuate(); } function FinalActions() { voto = ComputeMarks(); PrintResultOnTopFrame(); PrintResults(); PrintCopyright(1); } function SetClock(timeStr) { parent.frames[2].document.domanda.clock.value = timeStr; } function init_valid() { for (var i=0;i'); parent.frames[nframe].document.writeln (''); parent.frames[nframe].document.writeln (""+title+""); parent.frames[nframe].document.writeln (""); if (closeHead==1) parent.frames[nframe].document.writeln (''); } //--> Browser with no frames-enabled option 1