Changes between Version 39 and Version 40 of BoltRef


Ignore:
Timestamp:
Oct 24, 2008, 4:47:38 PM (16 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BoltRef

    v39 v40  
    137137}}}
    138138 '''title''' :: a name shown to students
     139
     140'''NOTE: the parameters of lesson() and all other course document API functions
     141can be given in any order.'''
    139142
    140143=== Exercise ===
     
    338341partway through refresh for set B.
    339342
    340 == Changing course documents ==
    341 
    342 Course documents can change over time.
    343 In fact, that's the whole point of Bolt:
    344 to constantly study the effectiveness of course materials,
    345 and change the course based on the results of that study.
    346 
    347 If a course changes while students are in the middle of it,
    348 Bolt recovers as gracefully as possible.
    349 For each student, Bolt maintains a "course state" - a set of data,
    350 for each control structure that the student has visited in the course,
    351 describing the student's "position" in that control structure.
    352 When a student clicks the Next button, or resumes the course after an interval,
    353 Bolt uses the course state to decide what item to display next.
    354 
    355 For example, suppose your course has a sequence with 3 elements,
    356 with logical names (red, yellow, blue).
    357 and a student is on the third.
    358 The course state for the sequence consists of two items: (blue, 2).
    359 'blue' is the logical name of the third element, and the index number 2
    360 (indicates that the student has completed 2 units in the sequence).
    361 
    362 If the student resumes the course, Bolt will find their place in
    363 the sequence first by looking up the logical name;
    364 if it is not found, then it will use the index number.
    365 For example:
    366  * If you change the sequence to (red, blue, green, yellow) then the student will be shown the units blue, green, and yellow.
    367  * If you change the sequence to (red, yellow, green) then the student will be shown the unit 'green'.
    368  * If you change the sequence to (red, yellow) then the student will have finished the sequence.
    369 
    370343=== Nesting and functions ===
    371344
     
    402375}}}
    403376
     377=== Course document notation explained ===
     378
     379If you're familiar with PHP you may wonder how Bolt's notation works.
     380The answer is that it uses get_func_args() and PHP's ability to
     381identify variable types at runtime.
     382There's a PHP class hierarchy underlying it;
     383units are represented by classes like BoltExercise, BoltSequence, etc.,
     384all of which are derived from BoltUnit.
     385So
     386{{{
     387sequence(
     388    name("foo"),
     389    lesson(filename("blah.php"))
     390);
     391}}}
     392is equivalent to
     393{{{
     394new BoltSequence(
     395   "foo",
     396   array(new BoltLesson("blah.php"))
     397);
     398}}}
     399== Changing course documents ==
     400
     401Course documents can change over time.
     402In fact, that's the whole point of Bolt:
     403to constantly study the effectiveness of course materials,
     404and change the course based on the results of that study.
     405
     406If a course changes while students are in the middle of it,
     407Bolt recovers as gracefully as possible.
     408For each student, Bolt maintains a "course state" - a set of data,
     409for each control structure that the student has visited in the course,
     410describing the student's "position" in that control structure.
     411When a student clicks the Next button, or resumes the course after an interval,
     412Bolt uses the course state to decide what item to display next.
     413
     414For example, suppose your course has a sequence with 3 elements,
     415with logical names (red, yellow, blue).
     416and a student is on the third.
     417The course state for the sequence consists of two items: (blue, 2).
     418'blue' is the logical name of the third element, and the index number 2
     419(indicates that the student has completed 2 units in the sequence).
     420
     421If the student resumes the course, Bolt will find their place in
     422the sequence first by looking up the logical name;
     423if it is not found, then it will use the index number.
     424For example:
     425 * If you change the sequence to (red, blue, green, yellow) then the student will be shown the units blue, green, and yellow.
     426 * If you change the sequence to (red, yellow, green) then the student will be shown the unit 'green'.
     427 * If you change the sequence to (red, yellow) then the student will have finished the sequence.
     428
     429
     430
    404431=== Logical names and state ===
    405432