| Version 1 (modified by , 18 years ago) (diff) |
|---|
Bolt Tutorial, part II: Exercises
Now let's add an exercise. Create a file "exercise1.php":
<?php
echo "Conifers are so named because:";
bolt_exclusive_choice(
array(
'They carry their seeds in cones',
'They are cone-shaped',
'They originated in the Coniceous era',
)
);
?>
and edit course_doc.php:
<?php
return sequence(
name('course'),
lesson(
name('lesson 1'),
filename('lesson1.php')
),
lesson(
name('lesson 2'),
filename('lesson2.html')
),
exercise(
name('exercise 1');
filename('exercise1.php');
)
);
?>
Start the course from the beginning. When you get to the exercise you'll see
You'll then see either
or
depending on whether you answered the question correctly.
Attachments (5)
- bolt_ex.jpg (164.7 KB) - added by 18 years ago.
- bolt_right.jpg (168.5 KB) - added by 18 years ago.
- bolt_wrong.jpg (172.2 KB) - added by 18 years ago.
- ex.png (1.2 KB) - added by 18 years ago.
- xset.png (5.3 KB) - added by 18 years ago.
Download all attachments as: .zip
