wiki:BoltTutorial

Version 8 (modified by davea, 16 years ago) (diff)

--

Bolt Tutorial

Creating a course

Install the BOINC software on a Linux system (or run the BOINC server virtual machine in a VMWare player on any computer).

Use make_project to create a BOINC project named "bolt_test":

> cd boinc/tools
> make_project --web_only bolt_test

Edit httpd.conf as directed (you'll need root access to do this). Let's say your server's domain name is "a.b.c".

Visit http://a.b.c/test/create_account.php and create an account for yourself.

Visit http://a.b.c/test_ops/bolt_ops.php, and create a course named "Test course" with course document "course_doc.php" (we'll create this later).

Lessons and sequences

Let's start with a simple course consisting of two lessons. Each lesson consists of a PHP or HTML file. Create the following files in ~/projects/test/html/user:

lesson1.php

<?php
    echo "
        This is the first lesson.
    ";
?>

lesson2.html

This is the second lesson.

course_doc.php

<?php
return sequence(
    name('course'),
    lesson(
        name('lesson 1'),
        filename('lesson1.php')
    ),
    lesson(
        name('lesson 2'),
        filename('lesson2.html')
    )
);
?>

Diagramatically, the course structure is:

Now visit http://a.b.c/test/bolt.php. You'll be asked to log in; do so. Click on the button to start the test course. You'll see:

No image "lesson1.png" attached to BoltTutorial

Note that below your lesson Bolt has added some navigation links and a form to ask questions. Click on the "Next" button. You'll see:

No image "lesson2.png" attached to BoltTutorial

Now suppose that instead of reading the lesson, you go away (for an hour or a month) and return. Simulate this by visiting http://a.b.c.test/bolt.php. You'll see

No image "restart.png" attached to BoltTutorial

Notice that Bolt "remembers" where you are in the course (this is stored in the database; it will work even if you go to a different computer).

Now click "Resume", and you'll see the second lesson again. Click on Next. You'll see:

No image "finished.png" attached to BoltTutorial

Now visit http://a.b.c.test/bolt.php again, and click on "History". You'll see something like:

No image "history.png" attached to BoltTutorial

Bolt has recorded your course interactions and their timing, in its database; this is used for course analytics (see below).

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

No image "ex.png" attached to BoltTutorial

You'll then see either

No image "right.png" attached to BoltTutorial

or

No image "wrong.png" attached to BoltTutorial

depending on whether you answered the question correctly.

Attachments (5)

Download all attachments as: .zip