Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:create:functions:random_items [13.01.2015 16:13]
alexander.ritter [Examples]
en:create:functions:random_items [11.04.2018 09:05]
admin
Line 20: Line 20:
 </code> </code>
  
-**Tip:** If questions AB01 and AB02 should be asked on different pages, use ''[[:en:create:functions:registervariable|registerVariable('items')]]'' to make the variable ''$items'' available for use on future pages.+**Tip:** If questions AB01 and AB02 should be asked on different pages, use ''[[:en:create:functions:registervariable|registerVariable($items)]]'' to make the variable ''$items'' available for use on future pages.
  
 In the following example, 3 items are randomly selected from items 1,2,3,4,9 and 9, and questions AB01 and AB02 are only shown with these items. In the following example, 3 items are randomly selected from items 1,2,3,4,9 and 9, and questions AB01 and AB02 are only shown with these items.
Line 37: Line 37:
 </code> </code>
  
-The same result can be obtained, however, with a corresponding parameter in the command ''[[en:create:functions:question|question()]]''.+The same result can be also obtained, however, with a corresponding parameter in the command ''[[en:create:functions:question|question()]]''.
  
 <code php> <code php>
 question('AB01', 'random=3'); question('AB01', 'random=3');
 </code> </code>
en/create/functions/random_items.txt · Last modified: 11.04.2018 09:05 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki