";
msg += "Questo quiz è stato creato ";
if (author!='') {
msg += "da "+author+" ";
}
msg += "con "+qmakeProgName+" "+qmakeVers+"";
msg += "";
return msg;
}
var tagOkImage;
var tagBoxImage;
var tagArrowImage;
var tagResponseImageOk;
var tagResponseImageKo;
function PrintReportStyle(doc, report_style)
{
doc.writeln("\n");
}
function PrintQstReport(qst_index, qst_num, doc, report_style)
{
doc.writeln(""+qst_index+" ");
doc.writeln(""+qstHead[qst_num]+"");
doc.writeln("
");
doc.writeln("");
if (valid[qst_num]==1) {
doc.writeln("Risposta corretta");
}
else if (valid[qst_num]==-1) {
doc.writeln("Risposta errata");
}
else if (valid[qst_num]==2) {
doc.writeln("Domanda non valutata");
}
else if (valid[qst_num]==3) {
if (typeOfQuest[qst_num]==2) {
doc.writeln("Affermazioni corrette "+nScore[qst_num]+" su "+maxScore[qst_num]);
}
else if (typeOfQuest[qst_num]==4) {
doc.writeln("Parole corrette "+nScore[qst_num]+" su "+maxScore[qst_num]);
}
else if (typeOfQuest[qst_num]==5) {
doc.writeln("Associazioni "+nScore[qst_num]+" su "+maxScore[qst_num]);
}
}
else if (valid[qst_num]==5) {
doc.write("punti "+nScore[qst_num]);
if (groups[qst_num]==0) {
doc.writeln(" (VOTO "+maxScore[qst_num]+")");
}
else if (groups[qst_num]==1) {
doc.writeln("
Punteggio cumulato con la domanda precedente");
}
else if (groups[qst_num]==2) {
doc.writeln("
VOTO (ottenuto dal punteggio cumulato delle domante successive): "+maxScore[qst_num]);
}
}
doc.writeln("");
doc.writeln("
");
}
function PrintAnsReport(qst_num, ans_num, doc, report_style)
{
var isGuess;
var choice,value,data;
var l,m;
if (typeOfQuest[qst_num]==4)
isGuess = getGuessFillGapN(qst_num,ans_num);
else if (typeOfQuest[qst_num]==5)
isGuess = (getGuessMatchN(qst_num,ans_num)==1);
else if (typeOfQuest[qst_num]==2)
isGuess = getGuessAnsN(qst_num,ans_num);
else {
if (reportNotation==1)
isGuess = getGuessAnsN(qst_num,ans_num);
else
isGuess = (allAnsReport[qst_num][ans_num].valuation + allAnsReport[qst_num][ans_num].data)>0;
}
if (report_style == 0) {
if (isGuess) {
doc.write(""+tagResponseImageOk+" | ");
}
else {
doc.write(""+tagResponseImageKo+" | ");
}
}
if (report_style == 0) {
doc.write("");
doc.write(""+Lettera(ans_num)+"");
doc.write(" | ");
}
else {
doc.write("");
doc.write("");
if (isGuess)
doc.write(""+Lettera(ans_num)+"");
else
doc.write(Lettera(ans_num));
doc.write("");
doc.write(" | ");
}
choice = allAnsReport[qst_num][ans_num].choice;
if (typeOfQuest[qst_num]==2) {
doc.write(" ");
PrintTrueOrFalse(doc,1);
doc.write(" ");
if (choice==1)
doc.write(tagOkImage+" | ");
else
doc.write(tagBoxImage+"");
doc.write(" ");
PrintTrueOrFalse(doc,0);
doc.write(" ");
if (choice==0)
doc.write(tagOkImage+" | ");
else
doc.write(tagBoxImage+"");
}
else if (typeOfQuest[qst_num]==4) {
doc.write("");
if (getGuessFillGapN(qst_num,ans_num))
doc.write(choice);
else {
doc.write(""+choice+"");
if (report_style == 0)
doc.write(" "+tagArrowImage+" ");
else
doc.write(" -> ");
for (l=0; l | ");
}
else if (typeOfQuest[qst_num]==5) {
doc.write("");
m = getGuessMatchN(qst_num,ans_num);
if (m==1) {
doc.write(choice[0]+" - "+choice[1]);
}
else if (m==0) {
doc.write(choice[0]+" - ");
doc.write(""+choice[1]+"");
if (report_style == 0)
doc.write(" "+tagArrowImage+" ");
else
doc.write(" -> ");
for (l=0; l"+choice[0]+" - "+choice[1]+"");
}
doc.write(" | ");
}
else {
if (report_style == 0)
doc.write("");
else
doc.write(" | ");
if (choice==1)
doc.write(tagOkImage);
else
doc.write(tagBoxImage);
doc.write(" | ");
}
doc.writeln("");
if (valid[qst_num]==5) {
value = allAnsReport[qst_num][ans_num].valuation;
data = allAnsReport[qst_num][ans_num].data;
doc.write(" ("+value+") ");
if (data!=0)
doc.write(" ("+data+") ");
}
if ((typeOfQuest[qst_num]==1)||(typeOfQuest[qst_num]==101)) {
if (allAnsReport[qst_num][ans_num].answer!="")
doc.write(allAnsReport[qst_num][ans_num].answer+" ");
if ((choice==1)||(remRepAlways==1))
doc.write(""+allAnsReport[qst_num][ans_num].remark+"");
}
doc.writeln(" | ");
}
function PrintReport(doc,report_style)
{
var i,j,n=1,k;
var half_index,index13,index23,index14,index34,col_width;
var okImage,boxImage,arrowImage,responseImageOk,responseImageKo;
if (isResultsPageDark==0) {
okImage = mediaDir+"/ok.gif";
boxImage = mediaDir+"/square.gif";
}
else {
okImage = mediaDir+"/ok2.gif";
boxImage = mediaDir+"/square2.gif";
}
tagOkImage = "";
tagBoxImage = "";
arrowImage = mediaDir+"/arrow.gif";
tagArrowImage = "";
responseImageOk = mediaDir+"/smile.gif";
tagResponseImageOk = "";
responseImageKo = mediaDir+"/ko.gif";
tagResponseImageKo = "";
half_index = Math.ceil(questions/2);
index13 = Math.ceil(questions/3);
index23 = Math.ceil(2*questions/3);
index14 = Math.ceil(questions/4);
index34 = Math.ceil(3*questions/4);
col_width = Math.floor(100 / ncols_report);
doc.writeln("");
for (k=0;k\n");
}
if ((k==0)&&(ncols_report>=2)) {
doc.writeln("\n");
}
if ((k==half_index)&&((ncols_report==2)||(ncols_report==4))) {
doc.writeln(" | ");
}
if (ncols_report==3) {
if ((k==index13)||(k==index23)) {
doc.writeln(" | ");
}
}
if (ncols_report==4) {
if ((k==index14)||(k==index34)) {
doc.writeln(" | ");
}
}
i = ordineDomande[k];
if (valid[i]==4)
continue;
PrintQstReport(n,i,doc,report_style);
n++;
if (report_style == 0)
doc.writeln(" ");
if (valid[i]==2) {
doc.write(""+allAnsReport[i][0].choice+"");
continue;
}
doc.writeln("");
for (j=0;j");
PrintAnsReport(i,j,doc,report_style);
if (report_style == 0)
doc.write("");
}
doc.writeln(" ");
}
doc.writeln(" |
");
}
function PrintLinkBar(doc)
{
var count = 0;
if (incl_print_btn) {
if (count>0) doc.writeln(" | ");
doc.writeln("STAMPA");
count++;
}
if (man_repeat) {
if (count>0) doc.writeln(" | ");
doc.writeln("RIPETI");
count++;
}
if (topChartFile!='') {
if (count>0) doc.writeln(" | ");
doc.writeln("Classifica");
count++;
}
if (incl_close_btn) {
if (count>0) doc.writeln(" | ");
doc.writeln("FINE");
count++;
}
}
function PrintResultTopBar(doc)
{
if ((showReport==1)&&(dhtmlEnabled==1)) {
doc.writeln("\n");
doc.writeln("Risultati del quiz | \n");
doc.writeln("");
PrintLinkBar(doc);
doc.writeln(" |
\n");
}
}
function PrintLinkBack(doc)
{
if (incl_linkback || incl_print_btn || man_repeat || (topChartFile!='') || incl_close_btn) {
doc.writeln("\n");
doc.writeln("");
if (incl_linkback)
PrintATagLinkBack(doc);
doc.writeln(" | ");
doc.writeln("\n");
PrintLinkBar(doc);
doc.writeln(" |
\n");
}
}
function PrintFrame(doc,titolo,msg)
{
doc.clear();
doc.open();
PrintOpenHTML(doc,titolo,1);
doc.writeln (bodyTagFrame1);
doc.writeln (msg);
doc.writeln ("");
doc.close();
}
function PrintJSResult(doc)
{
doc.writeln("\n");
}
function GetVoto(mark)
{
var tipo;
var str="";
tipo = GetTypeOfSubstitution(mark);
if (tipo == 2) {
return GetRemFromMark(voto);
}
else {
if (markPercentage==0) {
str += ""+voto+"/"+maxvoto;
}
else {
str += ""+voto+"/"+maxvoto+" ( "+Math.floor(voto*100/maxvoto)+"% )";
}
if (tipo == 1) {
str += " - "+GetRemFromMark(voto);
}
return str;
}
}
function PrintAnswer(n,textField)
{
var msg;
var explan = new initListOfRemark(n);
if (silent==1) {
if (PrintAnswer.arguments.length>1)
textField.value = "Risposta selezionata";
}
else {
if (valid[n]==1) {
if (PrintAnswer.arguments.length>1)
textField.value = "Risposta corretta";
msg = "Bravo ! Risposta esatta";
}
else {
msg = "Errato! La risposta corretta era " + getListOfRightAns(n);
if (PrintAnswer.arguments.length>1)
textField.value = msg;
msg = "" + msg + "";
}
PrintAnswerOnTopFrame(msg,explan,GetSoundName(n));
}
end_test = CountAnswers();
PrintStatusBar();
PrintBottomFrame();
if (end_test==1) {
window.status = "";
window.alert("Hai risposto a tutte le domande");
EndQuiz();
}
return end_test;
}
function PrintOpenAnswer(n,outMsg) {
outMsg.value = "Risposta completata";
end_test = CountAnswers();
PrintStatusBar();
PrintBottomFrame();
if (end_test==1) {
window.status = "";
window.alert("Hai risposto a tutte le domande");
EndQuiz();
}
return end_test;
}
function PrintBooleanAnswer(n,textField)
{
var msg,msg2,msgFormat;
var explan= new initOneElementVector();
explan[0] = "";
if (silent==0) {
msg = "Risposte corrette " + nScore[n] + " / " + getNumAns(n);
textField.value = msg;
msgFormat = "" + msg + "";
if (nScore[n]";
if (getGuessAns(n)La risposta corretta era " + getListOfRightAns(n);
PrintAnswerOnTopFrame(msgFormat,explan,GetSoundName(n));
}
else
textField.value = "Risposta selezionata";
end_test = CountAnswers();
PrintBottomFrame();
PrintStatusBar();
if (end_test==1) {
window.status = "";
window.alert("Hai risposto a tutte le domande");
EndQuiz();
}
return end_test;
}
function PrintAnswerOnTopFrame(message,explan,soundFile)
{
var i;
frames.quiz_top.document.clear();
frames.quiz_top.document.open();
PrintOpenHTML(frames.quiz_top.document,"",1);
frames.quiz_top.document.writeln (bodyTagFrame2);
frames.quiz_top.document.writeln ("");
frames.quiz_top.document.writeln (message+"
");
for (i=0;i")
}
frames.quiz_top.document.writeln ("");
if (soundFile!='')
frames.quiz_top.document.writeln ("