Changes between Initial Version and Version 1 of BoltTutorialExercises


Ignore:
Timestamp:
Feb 1, 2008, 1:23:23 PM (17 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BoltTutorialExercises

    v1 v1  
     1= Bolt Tutorial, part II: Exercises =
     2
     3Now let's add an exercise.
     4Create a file "exercise1.php":
     5{{{
     6<?php
     7echo "Conifers are so named because:";
     8bolt_exclusive_choice(
     9    array(
     10        'They carry their seeds in cones',
     11        'They are cone-shaped',
     12        'They originated in the Coniceous era',
     13    )
     14);
     15?>
     16}}}
     17
     18and edit course_doc.php:
     19{{{
     20<?php
     21return sequence(
     22    name('course'),
     23    lesson(
     24        name('lesson 1'),
     25        filename('lesson1.php')
     26    ),
     27    lesson(
     28        name('lesson 2'),
     29        filename('lesson2.html')
     30    ),
     31    exercise(
     32        name('exercise 1');
     33        filename('exercise1.php');
     34    )
     35);
     36?>
     37}}}
     38
     39Start the course from the beginning.
     40When you get to the exercise you'll see
     41
     42[[Image(ex.png, nolink)]]
     43
     44You'll then see either
     45
     46[[Image(right.png, nolink)]]
     47
     48or
     49
     50[[Image(wrong.png, nolink)]]
     51
     52depending on whether you answered the question correctly.