Changes between Version 13 and Version 14 of BoltTutorialExercises
- Timestamp:
- Aug 18, 2008, 3:23:36 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BoltTutorialExercises
v13 v14 2 2 3 3 Now let's add some exercises. 4 The first one is '''conifer_ex1.php''': 4 Create a new course, with short name "conifer2". 5 6 Bolt exercises are implemented as PHP scripts 7 that call Bolt-supplied functions for different types of questions. 8 For example: 5 9 {{{ 6 10 <?php … … 17 21 '''exclusive_choice()''' defines a multiple-choice question. 18 22 19 The exercises are added to the course file: 20 Then edit conifer.php: 23 Each exercise is represented in the course document 24 by an '''exercise''' unit; for example, 25 {{{ 26 exercise( 27 filename('conifer_ex1.php') 28 ) 29 }}} 30 31 Our course uses a new Bolt control structure, '''exercise_set''': 21 32 {{{ 22 33 function intro_exercises() { 23 34 return exercise_set( 24 35 name('Intro exercises'), 25 number(2),26 36 exercise( 27 37 filename('conifer_ex1.php') … … 36 46 ); 37 47 } 48 }}} 38 49 39 ... 50 An exercise represents a set of exercises, 51 which are shown in a random order. 52 By default all the exercises are shown 53 (if you want to show only N, add an entry '''number(N)'''). 54 We'll explain the '''repeat''' and '''refresh''' entries later. 40 55 41 return sequence(42 name('course'),43 intro_lessons(),44 intro_exercises(),45 pine_lessons(),46 id_exercises()47 );48 }}}49 56 Start the course from the beginning. 50 When you get to theexercise you'll see57 When you get to an exercise you'll see 51 58 52 59 [[Image(bolt_ex.jpg, nolink)]] … … 62 69 depending on whether you answered the question correctly. 63 70 64 65 71 Some notes: 66 72 * In '''exclusive_choice()''', the correct answer is always the first choice listed. Bolt randomly reorders the choices to remove any ordering effects. 67 73 * The exercise page is used to generate both the exercise and the answer page. 68 * If you look at your course history, you'll see that Bolt has stored your answers to the exercise, and your score, in its database.69 74 70 75 == Reviewing and repeating exercises == 71 76 72 77 Suppose the student doesn't perform the exercise correctly, 73 and you want to let them (or require them to) review the lessons and repeat the exercise ?74 Bolt provides a powerful mechanism for this, called '''exercise sets'''. 75 To illustrate this, first let's create a new exercise, '''conifer_ex2.php''':78 and you want to let them (or require them to) review the lessons and repeat the exercise. 79 80 In the above example, this is done as follows: 76 81 {{{ 77 <?php 78 echo " 79 Check the correct statements. 80 "; 81 82 inclusive_choice(array( 83 array("Conifers drop their leaves in autumn", 0), 84 array("All conifers have needle-like leaves", 0), 85 array("Conifers carry their seeds in cones", 1) 86 )); 87 ?> 82 repeat(.3, intro_lessons(), REVIEW), 83 repeat(.7, intro_lessons(), REVIEW|REPEAT), 84 repeat(1, null, REPEAT|NEXT), 88 85 }}} 89 86 90 Th is exercise is a set of true/false questions; the 0/1 arguments indicate which are true.87 These entries mean that: 91 88 92 Edit conifer.php to contain: 89 * If the student's score on the exercise set (i.e., the average of the scores on the exercises in the set) is less than 30%, the student is required to do a review, then repeat the exercise set. The review consists of the unit returned by '''intro_lessons()'''. 90 * If the student's score is in [30%, 70%), they are given the option of doing a review or immediately repeating the exercise set. 91 * If the student's score is in [70%, 100%), they are given the option of either repeating the exercise set or proceeding. 92 * If the student's score is 100% they are only given the option of proceeding. 93 94 == Refresh == 95 96 Learning research suggests that long-term retention occurs only when 97 material is "refreshed" at intervals of weeks or months. 98 If an exercise set contains an entry 93 99 {{{ 94 function both_lessons() { 95 return sequence( 96 name('both lessons'), 97 lesson( 98 name('Introduction'), 99 filename('conifer_intro.php') 100 ), 101 lesson( 102 name('Conifers and deciduous trees'), 103 filename('conifer_decid.php') 104 ) 105 ); 106 } 100 refresh(array(7, 14, 28)) 101 }}} 102 then, on completion of the exercise set, 103 a "refresh" is scheduled for the student. 104 The student will be reminded of the refresh on the web site, 105 or (if they have given approval) via email. 107 106 108 function second_lesson() { 109 return lesson( 110 name('Conifers and deciduous trees'), 111 filename('conifer_decid.php') 112 ); 113 } 114 115 function exercises() { 116 return exercise_set( 117 name('exercise set 1'), 118 number(2), 119 exercise( 120 filename('conifer_ex1.php') 121 ), 122 exercise( 123 filename('conifer_ex2.php') 124 ), 125 repeat(.3, both_lessons(), REVIEW), 126 repeat(.7, second_lesson(), REVIEW|REPEAT), 127 repeat(1, null, REPEAT|NEXT), 128 refresh(array(7, 14, 28)) 129 ); 130 } 131 132 return sequence( 133 name('course'), 134 both_lessons(), 135 exercises() 136 ); 137 138 }}} 139 140 141 The course structure is now: 142 143 [[Image(xset.png, nolink)]] 107 The array of numbers represents the intervals (in days) between refreshes. 108 The first refresh will be scheduled for 7 days after the initial completion. 109 The 2nd refresh will be scheduled for 14 days after the completion of the first refresh. 110 The 3rd and subsequent refreshes will be scheduled 28 days after the completion 111 of the previous refresh.