Changes between Initial Version and Version 1 of BoltRef


Ignore:
Timestamp:
Dec 3, 2007, 8:58:18 PM (17 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BoltRef

    v1 v1  
     1== Creating exercises ==
     2
     3A Bolt exercise is a PHP script.
     4Here's an example consisting of a multiple-choice question:
     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 during the Coniceous era.',
     13   ),
     14);
     15?>
     16}}}
     17Each time the question is shown,
     18the choices are shown in a random order.
     19The correct choice is the first element of the array.
     20
     21Here's an example that shows an image;
     22a correct answer is a click in the indicated subrectangle.
     23{{{
     24<?php
     25echo "Click on the dog's nose:<p>";
     26bolt_image_rect(
     27   'dog.jpg',
     28   array(100, 60, 110, 70)
     29);
     30?>
     31}}}
     32
     33Bolt supplies functions for other types of questions,
     34such as inclusive multiple-choice and fill-in-the-blank.
     35An exercise can include multiple questions.
     36
     37
     38== Course documents ==
     39
     40The structure of a Bolt course is defined by a [RFC:4627 JSON] document.
     41Here's an example of a course with two lessons followed by an exercise:
     42{{{
     43{
     44   "name": "Identifying Sierra Conifers",
     45   "description: "Learn to identify the major conifers of California's Sierra Nevada",
     46   "items": [
     47      {
     48          "type": "lesson",
     49          "name": "Introduction",
     50          "file": "intro.html"
     51      },
     52      {
     53          "type": "lesson",
     54          "name": "The Linnaean hierarchy",
     55          "file": "linnaean.html"
     56      },
     57      {
     58          "type": "exercise",
     59          "file": "linnaean.php"
     60      }
     61   ]
     62}
     63}}}
     64
     65Course items can be grouped into '''sets'''; for example:
     66
     67{{{
     68{
     69   "type": "set",
     70   "show_n": 1,
     71   "order": "random",
     72   "items": {
     73      {
     74      ...
     75      }
     76   }
     77}
     78}}}
     79
     80The attributes of a set include:
     81
     82 * show_n: the number of items in the set to show
     83 * order: whether to show the items sequentially or randomly
     84
     85Items (lessons, exercises, and sets) can include '''properties''', e.g.:
     86
     87{{{
     88{
     89   "type": "lesson",
     90   "name": "The Linnaean hierarchy",
     91   "file": "linnaean.html"
     92   "properties": {
     93      "verbal_level": 12,
     94      "detail_level": 0.8
     95   }
     96},
     97}}}
     98
     99When Bolt has a choice of items (e.g. when it encounters a set from which a
     100single item is to be shown) it calls, for each item, a course-supplied
     101'''matchmaking function''', passing to it the student object
     102(which includes demographics such as age)
     103and the item's properties (represented as a PHP object).
     104The matchmaking function returns a number representing the estimated
     105effectiveness of that item for that student,
     106and Bolt chooses the item with the highest value.