Changes between Version 4 and Version 5 of BoltImpl


Ignore:
Timestamp:
Jun 19, 2008, 12:19:02 PM (16 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BoltImpl

    v4 v5  
    7272A "course structure" is a tree of objects of the following types:
    7373
    74  * \BoltUnit
    75   * BoltItem
    76    * BoltLesson
    77    * BoltExercise
    78   * BoltSet
    79    * BoltRandom
    80     * BoltExerciseSet
    81    * BoltSelect
     74 * !BoltUnit
     75  * !BoltItem
     76   * !BoltLesson
     77   * !BoltExercise
     78  * !BoltSet
     79   * !BoltRandom
     80    * !BoltExerciseSet
     81   * !BoltSelect
     82
     83!BoltUnit has an abstract function
     84{{{
     85walk(&$iter, $incr, &$frac_done);
     86}}}
     87where $iter is a !BoltIter object (see below).
     88This does the following:
     89
     90 * Add a unit state structure for this unit to $iter->state.
     91 *
     92It is implemented in different ways in the different derived classes.
    8293
    8394=== Course state ===
    8495
    8596A '''course state''' represents a student's position in a course.
    86 It consists of an array that maps unit names to "unit state" structures.
     97It consists of an array that maps unit names to '''unit state''' structures.
    8798The contents of a unit state structure depends on the unit.
    8899Typically it includes the name of the current child,
     
    94105that the student is not currently in.
    95106
    96 Each BoltView record contains the course state when the view started.
     107Each !BoltView record contains the course state when the view started.
    97108
    98 === BoltIter ===
     109=== !BoltIter ===
    99110
    100 This data structure is used within the Bolt scheduler.
     111This object is used within the Bolt scheduler.
    101112It includes:
    102113
    103 '''top''':: the root of the course structure.
     114 '''top''':: the root of the course structure.
    104115
    105 '''state''':: the course state (from the latest BoltView record).
     116 '''state''':: the course state (from the latest !BoltView record).
    106117
    107 '''xset''':: the xset we're currently in, if any.
     118 '''xset''':: the xset we're currently in, if any.
    108119
    109 '''item''':: the current item
     120 '''item''':: the current item
    110121
    111 '''frac_done''':: fraction of course completed so far
     122 '''frac_done''':: fraction of course completed so far
    112123
     124Its member functions are:
    113125
     126 '''at()''':: get current item and fraction done
     127 '''next()''':: move to next item
    114128
     129These are both implemented by calling walk() on the root unit.