Changes between Version 26 and Version 27 of BoltRef
- Timestamp:
- Jan 25, 2008, 2:47:20 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BoltRef
v26 v27 258 258 Sequences were described above. 259 259 260 === Random ===261 The '''random''' control structure selects randomly (without replacement) from a set of units.262 {{{263 <?php264 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 structure286 (e.g. because of review or refresh).287 288 260 === Select === 289 261 … … 291 263 which returns the predicted benefit of showing the unit to the student. 292 264 The unit for which this value is greatest is shown. 265 The value function may be partly or entirely random. 266 267 This 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 293 272 {{{ 294 273 <?php … … 343 322 ); 344 323 }}} 324 345 325 346 326 == Exercise review and repeat == … … 394 374 the student may begin refresh for set A while 395 375 partway through refresh for set B. 376 377 === Random === 378 The '''random''' control structure selects randomly (without replacement) from a set of units. 379 {{{ 380 <?php 381 return 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 400 If 'number()' is given, that many units are shown; the default is one. 401 402 The 'without replacement' applies across multiple visits to the same structure 403 (e.g. because of review or refresh). 404 405