Changes between Version 4 and Version 5 of BoltImpl
- Timestamp:
- Jun 19, 2008, 12:19:02 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BoltImpl
v4 v5 72 72 A "course structure" is a tree of objects of the following types: 73 73 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 {{{ 85 walk(&$iter, $incr, &$frac_done); 86 }}} 87 where $iter is a !BoltIter object (see below). 88 This does the following: 89 90 * Add a unit state structure for this unit to $iter->state. 91 * 92 It is implemented in different ways in the different derived classes. 82 93 83 94 === Course state === 84 95 85 96 A '''course state''' represents a student's position in a course. 86 It consists of an array that maps unit names to "unit state"structures.97 It consists of an array that maps unit names to '''unit state''' structures. 87 98 The contents of a unit state structure depends on the unit. 88 99 Typically it includes the name of the current child, … … 94 105 that the student is not currently in. 95 106 96 Each BoltView record contains the course state when the view started.107 Each !BoltView record contains the course state when the view started. 97 108 98 === BoltIter ===109 === !BoltIter === 99 110 100 This data structureis used within the Bolt scheduler.111 This object is used within the Bolt scheduler. 101 112 It includes: 102 113 103 '''top''':: the root of the course structure.114 '''top''':: the root of the course structure. 104 115 105 '''state''':: the course state (from the latestBoltView record).116 '''state''':: the course state (from the latest !BoltView record). 106 117 107 '''xset''':: the xset we're currently in, if any.118 '''xset''':: the xset we're currently in, if any. 108 119 109 '''item''':: the current item120 '''item''':: the current item 110 121 111 '''frac_done''':: fraction of course completed so far122 '''frac_done''':: fraction of course completed so far 112 123 124 Its member functions are: 113 125 126 '''at()''':: get current item and fraction done 127 '''next()''':: move to next item 114 128 129 These are both implemented by calling walk() on the root unit.