Changes between Version 26 and Version 27 of BoltRef


Ignore:
Timestamp:
Jan 25, 2008, 2:47:20 PM (17 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BoltRef

    v26 v27  
    258258Sequences were described above.
    259259
    260 === Random ===
    261 The '''random''' control structure selects randomly (without replacement) from a set of units.
    262 {{{
    263 <?php
    264 return random(
    265     name('foobar'),
    266     number(2),
    267     lesson(
    268         name('lesson 1'),
    269         filename('bolt_sample_lesson1.php')
    270     ),
    271     lesson(
    272         name('lesson 2'),
    273         filename('bolt_sample_lesson2.php')
    274     ),
    275     lesson(
    276         name('lesson 3'),
    277         filename('bolt_sample_lesson3.php')
    278     ),
    279 );
    280 ?>
    281 }}}
    282 
    283 If 'number()' is given, that many units are shown; the default is one.
    284 
    285 The 'without replacement' applies across multiple visits to the same structure
    286 (e.g. because of review or refresh).
    287 
    288260=== Select ===
    289261
     
    291263which returns the predicted benefit of showing the unit to the student.
    292264The unit for which this value is greatest is shown.
     265The value function may be partly or entirely random.
     266
     267This structure has a special role; it is used
     268 * to implement "experiments" where different lessons are compared;
     269 * to implement "adaptive courses" where different lessons are shown to different types of students.
     270(or a mixture of the two).
     271
    293272{{{
    294273<?php
     
    343322);
    344323}}}
     324
    345325
    346326== Exercise review and repeat ==
     
    394374the student may begin refresh for set A while
    395375partway through refresh for set B.
     376
     377=== Random ===
     378The '''random''' control structure selects randomly (without replacement) from a set of units.
     379{{{
     380<?php
     381return random(
     382    name('foobar'),
     383    number(2),
     384    lesson(
     385        name('lesson 1'),
     386        filename('bolt_sample_lesson1.php')
     387    ),
     388    lesson(
     389        name('lesson 2'),
     390        filename('bolt_sample_lesson2.php')
     391    ),
     392    lesson(
     393        name('lesson 3'),
     394        filename('bolt_sample_lesson3.php')
     395    ),
     396);
     397?>
     398}}}
     399
     400If 'number()' is given, that many units are shown; the default is one.
     401
     402The 'without replacement' applies across multiple visits to the same structure
     403(e.g. because of review or refresh).
     404
     405