Changes between Version 13 and Version 14 of BoltTutorialExercises


Ignore:
Timestamp:
Aug 18, 2008, 3:23:36 PM (16 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BoltTutorialExercises

    v13 v14  
    22
    33Now let's add some exercises.
    4 The first one is '''conifer_ex1.php''':
     4Create a new course, with short name "conifer2".
     5
     6Bolt exercises are implemented as PHP scripts
     7that call Bolt-supplied functions for different types of questions.
     8For example:
    59{{{
    610<?php
     
    1721'''exclusive_choice()''' defines a multiple-choice question.
    1822
    19 The exercises are added to the course file:
    20 Then edit conifer.php:
     23Each exercise is represented in the course document
     24by an '''exercise''' unit; for example,
     25{{{
     26exercise(
     27    filename('conifer_ex1.php')
     28)
     29}}}
     30
     31Our course uses a new Bolt control structure, '''exercise_set''':
    2132{{{
    2233function intro_exercises() {
    2334    return exercise_set(
    2435        name('Intro exercises'),
    25         number(2),
    2636        exercise(
    2737            filename('conifer_ex1.php')
     
    3646    );
    3747}
     48}}}
    3849
    39 ...
     50An exercise represents a set of exercises,
     51which are shown in a random order.
     52By default all the exercises are shown
     53(if you want to show only N, add an entry '''number(N)''').
     54We'll explain the '''repeat''' and '''refresh''' entries later.
    4055
    41 return sequence(
    42     name('course'),
    43     intro_lessons(),
    44     intro_exercises(),
    45     pine_lessons(),
    46     id_exercises()
    47 );
    48 }}}
    4956Start the course from the beginning.
    50 When you get to the exercise you'll see
     57When you get to an exercise you'll see
    5158
    5259[[Image(bolt_ex.jpg, nolink)]]
     
    6269depending on whether you answered the question correctly.
    6370
    64 
    6571Some notes:
    6672 * In '''exclusive_choice()''', the correct answer is always the first choice listed.  Bolt randomly reorders the choices to remove any ordering effects.
    6773 * 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.
    6974
    7075== Reviewing and repeating exercises ==
    7176
    7277Suppose 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''':
     78and you want to let them (or require them to) review the lessons and repeat the exercise.
     79
     80In the above example, this is done as follows:
    7681{{{
    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 ?>
     82repeat(.3, intro_lessons(), REVIEW),
     83repeat(.7, intro_lessons(), REVIEW|REPEAT),
     84repeat(1, null, REPEAT|NEXT),
    8885}}}
    8986
    90 This exercise is a set of true/false questions; the 0/1 arguments indicate which are true.
     87These entries mean that:
    9188
    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
     96Learning research suggests that long-term retention occurs only when
     97material is "refreshed" at intervals of weeks or months.
     98If an exercise set contains an entry
    9399{{{
    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 }
     100refresh(array(7, 14, 28))
     101}}}
     102then, on completion of the exercise set,
     103a "refresh" is scheduled for the student.
     104The student will be reminded of the refresh on the web site,
     105or (if they have given approval) via email.
    107106
    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)]]
     107The array of numbers represents the intervals (in days) between refreshes.
     108The first refresh will be scheduled for 7 days after the initial completion.
     109The 2nd refresh will be scheduled for 14 days after the completion of the first refresh.
     110The 3rd and subsequent refreshes will be scheduled 28 days after the completion
     111of the previous refresh.