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:rotation [12.12.2014 17:33] – [Multiple Questions per Stimulus] alexander.ritter | en:create:rotation [05.04.2015 13:42] – [Rotation of Question Blocks] Update admin | ||
---|---|---|---|
Line 89: | Line 89: | ||
// go through list of questions ID for ID | // go through list of questions ID for ID | ||
// and show corresponding question each time | // and show corresponding question each time | ||
- | foreach ($questions as $ID) { | + | foreach ($questions as $id) { |
- | question($ID); | + | question($id); |
} | } | ||
} | } | ||
Line 212: | Line 212: | ||
if (!isset($blocks)) { | if (!isset($blocks)) { | ||
// define list of pages | // define list of pages | ||
- | $pages = array(' | + | $blocks |
// shuffle list | // shuffle list | ||
- | shuffle($pages); | + | shuffle($blocks); |
// add page where the questionnaire continues | // add page where the questionnaire continues | ||
- | $pages[] = ' | + | $blocks[] = ' |
// cache page order to prevent changes later on | // cache page order to prevent changes later on | ||
- | registerVariable(' | + | registerVariable($blocks); |
} | } | ||
- | setPageOrder($pages); | + | setPageOrder($blocks); |
</ | </ |