Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
en:create:functions:setpageorder [07.12.2017 17:27] – [PHP-Code] janinejulianerp | en:create:functions:setpageorder [29.09.2020 17:32] – [Example 1] sophia.schauer |
---|
**Note:** Filters can be inserted within the page order by using ''goToPage()''. If the filter jumps to a page within the ongoing page order, the sequence will be resumed there. If the filter jumps to a page outside of the page order, the normal page order in the questionnaire will be resumed from this page onwards. | **Note:** Filters can be inserted within the page order by using ''goToPage()''. If the filter jumps to a page within the ongoing page order, the sequence will be resumed there. If the filter jumps to a page outside of the page order, the normal page order in the questionnaire will be resumed from this page onwards. |
| |
===== Example 1 ===== | ===== Two possible processes ===== |
| |
The following scenario should be implemented using ''setPageOrder()''. There are two question blocks in the questionnaire: one of which is comprised of 5 pages and the other one of 7 pages. In one half of the questionnaire, Block A should be shown first and then Block B, and in the other half of the questionnaire, Block B should be shown first and then Block A. | The following scenario should be implemented using ''setPageOrder()''. There are two question blocks in the questionnaire: one of which is comprised of 5 pages and the other one of 7 pages. In one half of the questionnaire, Block A should be shown first and then Block B, and in the other half of the questionnaire, Block B should be shown first and then Block A. |
<code php> | <code php> |
if (!isset($pages)) { | if (!isset($pages)) { |
$pages = array('LA', 'GE',); | $pages = array('PA', 'PB', 'PC', 'PD', 'PE'); |
shuffle($pages); | shuffle($pages); |
$pages[] = 'EM'; | $pages[] = 'PX'; |
registerVariable($pages); | registerVariable($pages); |
} | } |