Changes between Version 15 and Version 16 of BoltRef


Ignore:
Timestamp:
Dec 26, 2007, 9:55:48 AM (16 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BoltRef

    v15 v16  
    246246
    247247=== Random ===
    248 The '''random''' control structure selects randomly from a set of units.
    249 {{{
    250 <?php
    251 return select(
    252     name('course'),
     248The '''random''' control structure selects randomly (without replacement) from a set of units.
     249{{{
     250<?php
     251return random(
     252    name('foobar'),
     253    number(2),
    253254    lesson(
    254255        name('lesson 1'),
     
    259260        filename('bolt_sample_lesson2.php')
    260261    ),
    261 );
    262 ?>
    263 }}}
     262    lesson(
     263        name('lesson 3'),
     264        filename('bolt_sample_lesson3.php')
     265    ),
     266);
     267?>
     268}}}
     269
     270If 'number()' is given, that many units are shown; the default is one.
     271
     272The 'without replacement' applies across multiple visits to the same structure
     273(e.g. because of review or refresh).
    264274
    265275=== Select ===