PDA

View Full Version : Quiz Template



bobohearn
02-28-2004, 04:37 AM
I am using the quiz template and I need to add questions. There are three and I need 10. I tried copying and pasting more questions but I get a an error message. I am under the gun to get this done by Monday. Any help would be appreciated.

Corey
02-28-2004, 05:32 AM
Hi Bob. OK when you start a new project from the quiz template and then go into the OnShow tab in the Actions panel of the Page properties dialog at the top where it says:

-- How many questions are in your quiz?
question_max = 3;

Did you change that value?

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

bobohearn
02-28-2004, 05:35 AM
Hi Corey, yes I changed it to 10.

Corey
02-28-2004, 05:57 AM
OK, hmmm. If you could post your code and a screencap of the error maybe I could spot the solution.

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

bobohearn
02-28-2004, 06:01 AM
Corey, after I paste a new question I get this dialogue box


On click line 10, attempt to concatenate field '?' (a nil value)

bobohearn
02-28-2004, 06:05 AM
-- How many questions are in your quiz?
question_max = 10;

-- This is the question list
question_list = {};
question_list [1] = "Which process is NOT a type of disease outcome\n\nA - clinical\nB - management\nC - humanistic\nD - economic\nE - none of the above";
question_list [2] = "What is the product of multiplying 7 by 9?\n\nA - 32\nB - 48\nC - 63\nD - 78\nE - 16";
question_list [3] = "What color is a brown dog?\n\nA - Blue\nB - Red\nC - Green\nD - Brown\nE - Gold";
question_list [4] = "Huh dog?\n\nA - Blue\nB - Red\nC - Green\nD - Brown\nE - Gold";
question_list [5] = "What is your name?\n\nA - Blue\nB - Red\nC - Green\nD - Brown\nE - Gold";
question_list [6] = "Who are you?\n\nA - Blue\nB - Red\nC - Green\nD - Brown\nE - Gold";
question_list [7] = "What color is a brown dog?\n\nA - Blue\nB - Red\nC - Green\nD - Brown\nE - Gold";
question_list [8] = "What color is a brown dog?\n\nA - Blue\nB - Red\nC - Green\nD - Brown\nE - Gold";
question_list [9] = "What color is a brown dog?\n\nA - Blue\nB - Red\nC - Green\nD - Brown\nE - Gold";






-- This is a list of corresponding correct answers
answer_list = {"C","C","D"};

-- Set up a few global variables to track the progress
question_index = 0;
numcorrect = 0;

-- Let's hide some of the text and buttons we don't need right away
Label.SetText("Status","");
HideAnswerButtons();

Corey
02-28-2004, 06:29 AM
Hi Bob, don't forget to add your answers too, i.e.:-- This is a list of corresponding correct answers

answer_list = {"C","C","D"};

Only contains 3 answers still. What exactly does the error say?

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

bobohearn
02-28-2004, 06:36 AM
Fourth cup of coffee did it! I needed to add the corresponding answers (A,B,C, etc.Corey thanks so much for your quick reply.

Corey
02-28-2004, 06:43 AM
Cool! No problem... :)

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

willfreer
01-25-2005, 02:51 PM
This is awesome!! I have 2 questions, what if I have a quiz of 100 question typed in word, with multiple choice answers. Do I have to cut and paste each question and answer one at a time into the script?

Also data colection, is there an code to copy/or save the results for the user?

Thanks again.