diff --git a/src/lab/exp1/quizconfig.js b/src/lab/exp1/quizconfig.js index 550e9e4..b556c30 100644 --- a/src/lab/exp1/quizconfig.js +++ b/src/lab/exp1/quizconfig.js @@ -1,12 +1,13 @@ /*********************************************** -* JavaScriptKit.com Multiple Choice Quiz Script (http://www.javascriptkit.com) -* Copyright 2003 JavaScript Kit- http://www.javascriptkit.com -* This notice and footnote must stay intact for use -* Visit JavaScript Kit (http://www.javascriptkit.com/) for full source code -***********************************************/ + * JavaScriptKit.com Multiple Choice Quiz Script (http://www.javascriptkit.com) + * Copyright 2003 JavaScript Kit- http://www.javascriptkit.com + * This notice and footnote must stay intact for use + * Visit JavaScript Kit (http://www.javascriptkit.com/) for full source code + ***********************************************/ //Enter total number of questions: var totalquestions=5 +var correct //Enter the solutions corresponding to each question: var correctchoices=new Array() @@ -19,53 +20,53 @@ correctchoices[5]='a' /////Don't edit beyond here////////////////////////// function gradeit(){ -var incorrect=null -for (q=1;q<=totalquestions;q++){ - var thequestion=eval("document.myquiz.question"+q) - for (c=0;cSolution') -win2.document.write('') -win2.document.write('

Solution to Quiz

') -win2.document.write('
') -for (i=1;i<=totalquestions;i++){ -for (temp=0;temp") -wrong=0 -} -else -win2.document.write("Question "+i+"="+correctchoices[i]+"
") -} -win2.document.write('
') -win2.document.write("
Note: The solutions in red are the ones to the questions you had incorrectly answered.
") -win2.document.close() + var win2=window.open("","win2","width=200,height=350, scrollbars") + win2.focus() + win2.document.open() + win2.document.write('Solution') + win2.document.write('') + win2.document.write('

Solution to Quiz

') + win2.document.write('
') + for (i=1;i<=totalquestions;i++){ + for (temp=0;temp") + wrong=0 + } + else + win2.document.write("Question "+i+"="+correctchoices[i]+"
") + } + win2.document.write('
') + win2.document.write("
Note: The solutions in red are the ones to the questions you had incorrectly answered.
") + win2.document.close() } diff --git a/src/lab/exp1/results.htm b/src/lab/exp1/results.htm index 095bcfe..90494c2 100644 --- a/src/lab/exp1/results.htm +++ b/src/lab/exp1/results.htm @@ -22,7 +22,7 @@

- The questions you got wrong: + The questions you got right:

@@ -51,14 +51,14 @@ } -var incorrect=results[parse].split("=") -incorrect=incorrect[1].split("/") -if (incorrect[incorrect.length-1]=='b') -incorrect="" -document.result[0].value=totalquestions-incorrect.length+" out of "+totalquestions -document.result[2].value=(totalquestions-incorrect.length)/totalquestions*100+"%" -for (temp=0;temp diff --git a/src/lab/exp2/quizconfig.js b/src/lab/exp2/quizconfig.js index 72c3836..180af84 100644 --- a/src/lab/exp2/quizconfig.js +++ b/src/lab/exp2/quizconfig.js @@ -19,25 +19,25 @@ correctchoices[5]='a' /////Don't edit beyond here////////////////////////// function gradeit(){ -var incorrect=null +var correct=null for (q=1;q<=totalquestions;q++){ var thequestion=eval("document.myquiz.question"+q) for (c=0;c

- The questions you got wrong: + The questions you got right:

@@ -51,14 +51,14 @@ } -var incorrect=results[parse].split("=") -incorrect=incorrect[1].split("/") -if (incorrect[incorrect.length-1]=='b') -incorrect="" -document.result[0].value=totalquestions-incorrect.length+" out of "+totalquestions -document.result[2].value=(totalquestions-incorrect.length)/totalquestions*100+"%" -for (temp=0;temp diff --git a/src/lab/exp3/quizconfig.js b/src/lab/exp3/quizconfig.js index a38f135..3df946e 100644 --- a/src/lab/exp3/quizconfig.js +++ b/src/lab/exp3/quizconfig.js @@ -19,25 +19,25 @@ correctchoices[5]='a' /////Don't edit beyond here////////////////////////// function gradeit(){ -var incorrect=null +var correct=null for (q=1;q<=totalquestions;q++){ var thequestion=eval("document.myquiz.question"+q) for (c=0;c

- The questions you got wrong: + The questions you got right:

@@ -51,14 +51,14 @@ } -var incorrect=results[parse].split("=") -incorrect=incorrect[1].split("/") -if (incorrect[incorrect.length-1]=='b') -incorrect="" -document.result[0].value=totalquestions-incorrect.length+" out of "+totalquestions -document.result[2].value=(totalquestions-incorrect.length)/totalquestions*100+"%" -for (temp=0;temp