Jump to content

Question Writer Manual/About Questions/Skipping and Branching

From Wikibooks, open books for an open world

Skipping and Branching

[edit | edit source]
You can use the feedback mechanism so that quiz takers are automatically taken to another part of the quiz based on an evaluation of their answer. The jump can be to another question, to another page or to another piece of feedback. The evaluation will usually be whether a single score is greater or less than a particular value, but can also include more complex conditions (And, Not, Or).

You can try out this sample quiz in your browser [[1]]. In this quiz the quiz taker is asked a first question (the Screener). If the quiz taker does well, they skip to an advanced question; if they do poorly, they jump to an easier question.



There are a few things happening here.

Firstly the score variable 'Screener' is associated with the Partial Credit question. Any score achieved here is associated with this score variable and used to make an initial evaluation.

In the feedback node, we check to see if the score is greater than 6 - if so, we branch to the Population question. If not the user moves onto the Multiple Choice question skipping the more difficult Population question.

NB the Population and Vatican questions have metadata associated with them - this is so we can give them specific names. The name must the same in the Branch action as it is in the Question Metadata Title, the Page Title, or the Feedback identifier.


You can download the source file (.qwz) of this example to have a closer look at the set up [[2]].

Feedback

[edit | edit source]

You can set a new Redirect URL at the end of the quiz based on a user's score. For example, if the user passes, you might send him to one webpage, and if not to another. The setting is in the Branch element - the Branch is activated when the associated condition evaluates to true.

You can place the feedback in the report section instead of between the questions. This is useful if you want to send the results to the server before giving feedback to the user.

If you're displaying question feedback too, the custom feedback will appear in the position you place it between the questions. For example, if you place the feedback between questions 2 and 3 and check the 'Report Section' option, the feedback will appear between the question 2 feedback and question 3 feedback.

Here’s a sample quiz [3] with a full worked example. (Right click and ‘Save As). It forwards the user to one of four different Wikipedia pages based on the score achieved. You might need to publish the quiz in order to see the redirect in action, as a local security sandbox may prevent the quiz from redirecting to a new page.