Hi,
Thank you for your enquiry.
Although the Question Page Wizard provides a quick method of creating common types of quiz and questionnaire, you may find that you require a style of quiz which is not currently supported by the Wizard or need to modify an existing template to behave in a different way. For example, you may need a multiple-choice quiz with six possible answers, whereas most of the templates support a maximum of four answers. It is at times like these where it is useful to have knowledge of how the quiz templates use variables to monitor the user's input and keep records of their performance.
Please find attached a zip folder containing the file quiz.imp. This publication contains three question pages and a summary page informing the user of their correct answers and the final score.
Page 1 contains a text input box which feeds into the variable answer1 (in other words, any information inputted into this text input box is stored in the answer1 variable). I have then added a Submit button which uses an If statement to compare the user input (the variable answer1) to a string of text (in this case, the word LIMA).
If the answer1 variable matches the text LIMA, a variable called score1 is increased by 1 and another variable named FinalScore is increased by 1. I have also added a Show action to display a Correct message for 2.00 seconds and a Hide action to hide the text input box (and prevent further input whilst the Correct message is showing).
If answer1 does not equal LIMA, an Incorrect message is displayed and the text input box is hidden to prevent further input.
After all of these actions have taken place, a Go To Page <Forward> action displays the next page.
I have then simply duplicated this page twice, and changed the input variable (to answer2), If statement and actions to match the new question. If question 2 is answered correctly, a variable called score2 is increased, but the original TotalScore variable is also increased.
The summary page simply uses a series of If statements to check which score variables are set to 0 (signifying that the question was answered incorrectly) and which are set to 1 (meaning a correct answer), then shows the corresponding text to inform the user of their correct and incorrect answers.
Although variables can initially appear daunting, many users find that getting to grips with this method of storing information opens up completely new possibilities for publication types and greatly enhances the usability and flexibility of publications.
I hope this helps. Please do not hesitate to contact me if you have any further queries.
Kind regards,
You do not have the required permissions to view the files attached to this post.
_________________ Robin Garrett
Digital Workshop Technical Support
For this message Robin Garrett has been thanked by : mackavi
|