Changes between Version 5 and Version 6 of BoltRef


Ignore:
Timestamp:
Dec 4, 2007, 9:08:25 PM (17 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BoltRef

    v5 v6  
    135135
    136136=== Random ===
    137 The '''random''' control structure
     137The '''random''' control structure selects randomly from a set of units.
    138138{{{
    139139<?php
     
    156156{{{
    157157<?php
     158function value($unit) {
     159    global $student;
     160    return abs($student->verbal_level - $unit->verbal_level);
     161}
     162
    158163return select(
    159164    name('course'),
     165    valuator(value),
    160166    lesson(
    161         value(val_func1($student)),
    162167        name('lesson 1'),
    163168        filename('bolt_sample_lesson1.php')
    164169    ),
    165170    lesson(
    166         value(val_func1($student)),
    167171        name('lesson 2'),
    168172        filename('bolt_sample_lesson2.php')