Surveys and Quizzes
Multistage has a built-in capability for adding surveys or quizzes to any extension.
Difference Between Quizzes and Surveys
The surveys and quizzes are constructed in the same way, with one minor difference: for quizzes, a correct answer is specified in the metadata and the subjects cannot proceed until all quiz questions have been answered correctly, and for surveys no correct answer is specified and the subject's answer is recorded in the program output.
Enabling the Survey Module
Generally, to enable the survey module, the person writing the extension checks the metadata for a 'askQuestions' boolean, and if it's true, instructs the program to read in the questions metadata:
if( getBooleanProperty("askQuestions") ){
Vector[][] questions = constructQuestions();
After reading in the questions from the metadata, the programmer then tells the program to ask the questions at the appropriate point in the flow of the game, by using any of the methods included in edu.caltechUcla.sselCassel.projects.multistage.server.control.ServerControl - methods exist for the questioning of a single subject, or all subjects, or all subjects at the end of the current round or match.
For example, this method call asks all subjects the same questions at the end of the current match:
questionSubjectsPostMatch(questions);
Types of questions available
There are several different kinds of questions built in:
ChoiceQuestion
A ChoiceQuestion is a multiple-choice question. If a correct answer is specified, it is a quiz question which the subject must answer correctly to continue. If no correct answer is specified, it is a survey question, and the subject's answer is recorded in the output. A sample ChoiceQuestion is specified below:
match.0.round.0.question.0=If you have seven apples and eat four how many do you have left? match.0.round.0.question.0.type=choice match.0.round.0.question.0.ans.0=One match.0.round.0.question.0.ans.1=Two match.0.round.0.question.0.ans.2=Three match.0.round.0.question.0.ans.3=Four match.0.round.0.question.0.correct=2 match.0.round.0.question.0.outputName=sevenMinusFourChoice
InstructionQuestion
An InstructionQuestions is not really a question at all - it's intended to be used to give instructions to the subjects. Text is shown with no answers to be given. A sample InstructionQuestion is specified below:
match.0.round.0.question.1=Please answer the following questions as honestly as possible match.0.round.0.question.1.type=instruction
DropdownQuestion
A DropdownQuestion is similar to a multiple-choice question, but instead of having the different options laid out all at once, it presents them in a dropdown menu. A sample DropdownQuestion is specified below:
match.0.round.0.question.2=If you have seven apples and eat four how many do you have left? match.0.round.0.question.2.type=dropdown match.0.round.0.question.2.ans.0=One match.0.round.0.question.2.ans.1=Two match.0.round.0.question.2.ans.2=Three match.0.round.0.question.2.ans.3=Four match.0.round.0.question.2.correct=2 match.0.round.0.question.2.outputName=sevenMinusFourDropdown
SliderQuestion
A SliderQuestion lets the subject choose from a range of answers using a slider. The experimenter specifies a minimum, a maximum, and an increment. A sample SliderQuestion is specified below:
match.0.round.0.question.3=If you have seven apples and eat four how many do you have left? match.0.round.0.question.3.type=slider match.0.round.0.question.3.min=1 match.0.round.0.question.3.max=4 match.0.round.0.question.3.inc=1 match.0.round.0.question.3.answer=3 match.0.round.0.question.3.outputName=sevenMinusFourSlider
TextQuestion
A TextQuestion lets the subject specify the answer to their question by typing it into a single-line text box. The experimenter cannot specify a correct answer to a TextQuestion. A sample TextQuestion is specified below:
match.0.round.0.question.4=If you have seven apples and eat four, how many do you have left? match.0.round.0.question.4.type=text match.0.round.0.question.4.outputName=sevenMinusFourText
EssayQuestion
An EssayQuestion is much like a TextQuestion, except rather than a single line box for subjects to respond in it provides a larger space, presumably for a longer answer. A sample EssayQuestion is specified below:
match.0.round.0.question.5=If you have seven apples and you eat four, how many do you have left? (Please explain your steps) match.0.round.0.question.5.type=essay match.0.round.0.question.5.outputName=sevenMinusFourEssay
