Changes between Version 11 and Version 12 of BoltTutorialExercises


Ignore:
Timestamp:
Aug 16, 2008, 8:58:46 PM (16 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BoltTutorialExercises

    v11 v12  
    11= Bolt Tutorial, part II: Exercises =
    22
    3 Now let's add an exercise.
    4 Create a file '''exercise1.php''':
     3Now let's add some exercises.
     4The first one is '''conifer_ex1.php''':
    55{{{
    66<?php
     
    1717'''exclusive_choice()''' defines a multiple-choice question.
    1818
     19The exercises are added to the course file:
    1920Then edit conifer.php:
    2021{{{
    21 <?php
     22function 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
    2239...
     40
    2341return sequence(
    2442    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()
    3747);
    38 
    39 ?>
    4048}}}
    4149The course structure is now