AddQuestion
Summary
This script allows you to add a question to the questionnaire which will have any amount of multiple answers and 1 correct answer.
Parameters
Question
Type: Text Default: None
The question to ask the user.
Answers
Type: Text Default: None
Each of the answers that will be available for the user to choose. The answers must be separated with a ',' . For example:
Answers=“Yes,No,Maybe,Definitely Not”
Each answer will show up as it's own clickable button. When clicked, it will compare the chosen answer to the one assigned with the CorrectAnswer parameter. If it matches, the users score will be increased.
CorrectAnswer
Type: Integer Default: 0
The number assigned to the correct answer provided in the Answers parameter. The number is assigned starting from 0 and reading left to right.
For example:
In the parameter: Answers=“Yes,No,Maybe,Definitely Not”
Yes = 0 No = 1 Maybe = 2 Definitely Not = 3
To make the correct answer “Yes”, the syntax would be:
CorrectAnswer=“0”
Image
Type: Path Default: None
This parameter allows you to assign an image file for the question to show (along with the text describing it).
Examples
<addquestion Question="What is the answer to the problem 34+78=?" Answers="89,113,110,112" CorrectAnswer="3" />
The above code will add a question to the questionnaire with the answers 89 113 110 and 112 and assign the correct answer as the answer in the 3 slot which is 112.