[[Rotation]]
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
en:create:rotation [05.04.2015 13:42]
admin [Rotation of Question Blocks] Update
en:create:rotation [01.04.2019 15:07] (current)
bryton [Rotation of Multiple Questions]
Line 87: Line 87:
   // cache rotation in case page is repeated    // cache rotation in case page is repeated 
   registerVariable('questions');   registerVariable('questions');
-  // go through list of questions ID for ID +   
-  // and show corresponding question each time  +
-  foreach ($questions as $id) { +// go through list of questions ID for ID 
-    question($id); +// and show corresponding question each time  
-  }+foreach ($questions as $id) { 
 +  question($id);
 } }
 </code> </code>
  
 **Advice:** If you use a similar rotation at different points within the questionnaire then the name of the variable ''$questions'' must be varied. For example, ''$questions1'' for the first time it is used and ''$questions2'' for the second time.   **Advice:** If you use a similar rotation at different points within the questionnaire then the name of the variable ''$questions'' must be varied. For example, ''$questions1'' for the first time it is used and ''$questions2'' for the second time.  
- 
 ===== Rotating Questions over Multiple Pages ===== ===== Rotating Questions over Multiple Pages =====
  
en/create/rotation.txt · Last modified: 01.04.2019 15:07 by bryton
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki