Changes between Version 11 and Version 12 of BoltTutorialExercises
- Timestamp:
- Aug 16, 2008, 8:58:46 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BoltTutorialExercises
v11 v12 1 1 = Bolt Tutorial, part II: Exercises = 2 2 3 Now let's add an exercise.4 Create a file '''exercise1.php''':3 Now let's add some exercises. 4 The first one is '''conifer_ex1.php''': 5 5 {{{ 6 6 <?php … … 17 17 '''exclusive_choice()''' defines a multiple-choice question. 18 18 19 The exercises are added to the course file: 19 20 Then edit conifer.php: 20 21 {{{ 21 <?php 22 function intro_exercises() { 23 return exercise_set( 24 name('Intro exercises'), 25 number(2), 26 exercise( 27 filename('conifer_ex1.php') 28 ), 29 exercise( 30 filename('conifer_ex2.php') 31 ), 32 repeat(.3, intro_lessons(), REVIEW), 33 repeat(.7, intro_lessons(), REVIEW|REPEAT), 34 repeat(1, null, REPEAT|NEXT), 35 refresh(array(7, 14, 28)) 36 ); 37 } 38 22 39 ... 40 23 41 return sequence( 24 42 name('course'), 25 lesson( 26 name('Introduction'), 27 filename('conifer_intro.php') 28 ), 29 lesson( 30 name('Conifers and deciduous trees'), 31 filename('conifer_decid.php') 32 ), 33 exercise( 34 name(''), 35 filename('conifer_ex1.php') 36 ) 43 intro_lessons(), 44 intro_exercises(), 45 pine_lessons(), 46 id_exercises() 37 47 ); 38 39 ?>40 48 }}} 41 49 The course structure is now