Changes between Version 40 and Version 41 of BoltRef


Ignore:
Timestamp:
Oct 28, 2008, 1:04:21 PM (16 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BoltRef

    v40 v41  
    77 * '''Lessons''': any web-based teaching material
    88 * '''Exercises''', used for reinforcement and/or assessment.
    9  * A '''course document''' describing the order in which lessons and exercises are shown.
     9 * A '''course document''' describing the order in which lessons and exercises are shown, and grouping them into '''units'''.
    1010
    1111== Installing Bolt ==
     
    2828
    2929A '''Lesson''' contains instructional material.
    30 It may be either an HTML file or PHP script.
    31 It may contain embedded audio, video, Flash, or any other content.
     30It may be an HTML file or a PHP script that generates HTML.
     31In either case, the HTML may contain embedded audio, video, Flash, or any other content.
    3232Some restrictions:
    3333
    34  * It shouldn't contain enclosing <html> or <body> tags (Bolt will supply these, as well as navigational header and footer).
     34 * It shouldn't contain enclosing <html> or <body> tags (Bolt will supply these).
    3535 * It shouldn't contain any hyperlinks (Bolt will supply navigational links).
    3636
    37 If a lesson is implemented as a PHP script, information about the student is available to it
    38 in a global variable $student,
    39 This information may be used to customize the page.
    40 The available information is:
    41 {{{
    42 $student->sex;    // 0=unknown, 1=male, 2=female (as in ISO 5218)
    43 $student->birth_year;
    44 $student->country;
    45 $student->name;
     37If a lesson is implemented as a PHP script,
     38it can access information about the student viewing the lesson,
     39as well as its own attributes (specified in the course document; see below).
     40
     41
     42== Exercises ==
     43
     44Exercises are PHP scripts that call Bolt API functions to create questions.
     45The exercise API includes the following functions:
     46{{{
     47exclusive_choice(
     48    'option1',
     49    'option2',
     50     ...
     51    [ weight(X) ]
     52);
     53}}}
     54This specifies a multiple-choice question where at most one answer can be chosen.
     55The correct choice is the first one
     56(when the question is shown, the choices are presented in a random order).
     57
     58An exercise script can contain multiple questions.
     59If '''weight()''' is given, it specifies this question's grading weight;
     60the default is 1.
     61
     62{{{
     63inclusive_choice(
     64    array('option1', true|false),
     65    array('option2', true|false),
     66    [ weight(X) ]
     67);
     68}}}
     69This specifies a multiple-choice question where any number of answers can be chosen.
     70
     71{{{
     72image_rect(
     73   image_filename,
     74   array(xmin, xmax, ymin, ymax)
     75);
     76?>
     77}}}
     78This specifies a question where the student clicks on an image;
     79a correct answer is a click in the indicated subrectangle
     80((0,0) is the upper left corner of the image).
     81
     82In addition to calling these functions,
     83an exercise script can intersperse text among the questions.
     84Example:
     85{{{
     86<?php
     87echo 'Conifers are so named because:';
     88exclusive_choice(
     89   'They carry their seeds in cones.'
     90   'They are cone-shaped.',
     91   'They originated during the Coniceous era.'
     92);
     93?>
     94}}}
     95
     96The same script is used to generate both the exercise page and the answer page
     97(where the student gets feedback on their response).
     98You may want to show different text on these two pages.
     99This can be done as follows:
     100{{{
     101switch ($bolt_ex->mode) {
     102case BOLT_MODE_SHOW:
     103   echo "This is the exercise page.";
     104   break;
     105case BOLT_MODE_ANSWER:
     106   echo "This is the answer page.";
     107   break;
     108}}}
     109
     110
     111Like lessons, exercises can access student attributes
     112as well as their own attributes.
     113
     114== Attributes ==
     115
     116Bolt allows arbitrary '''attributes''' to be associated with students and course units.
     117A few student attributes are pre-defined: country, sex and age.
     118All other attributes are specified by the course itself,
     119and are stored in a PHP data structure.
     120
     121The attributes of a course unit are specified in the course document.
     122They might include, for example:
     123 * The [http://en.wikipedia.org/wiki/Reading_level reading level] of the content.
     124 * The [http://en.wikipedia.org/wiki/Theory_of_multiple_intelligences intelligence type] emphasized by the content.
     125 * The unit's level of detail.
     126 * Keywords representing the student interests targeted by the content.
     127
     128A lesson or exercise can access its own attributes using:
     129{{{
     130$attrs = item_attrs();
     131}}}
     132
     133The attributes of a student are accessed using:
     134{{{
     135student_sex();                // 0=unknown, 1=male, 2=female (as in ISO 5218)
     136student_age();
     137student_country();
     138student_name();
     139$attrs = student_attrs();     // get course-defined attributes
    46140}}}
    47141
     
    58152An alternative way to vary content based on student attributes is
    59153to use separate lesson files, selected in the course document (see below).
    60 
    61 == Exercises ==
    62 
    63 Exercises are PHP scripts that call Bolt API functions to create questions.
    64 The API is:
    65 {{{
    66 exclusive_choice(
    67     'option1',
    68     'option2',
    69      ...
    70     [ weight(X) ]
    71 );
    72 }}}
    73 This specifies a multiple-choice question where at most one answer can be chosen.
    74 The correct choice is the first one
    75 (when the question is shown, the choices are presented in a random order).
    76 
    77 An exercise script can contain multiple questions.
    78 If '''weight()''' is given, it specifies this question's grading weight;
    79 the default is 1.
    80 
    81 {{{
    82 inclusive_choice(
    83     array('option1', true|false),
    84     array('option2', true|false),
    85     [ weight(X) ]
    86 );
    87 }}}
    88 This specifies a multiple-choice question where any number of answers can be chosen.
    89 
    90 {{{
    91 image_rect(
    92    image_filename,
    93    array(xmin, xmax, ymin, ymax)
    94 );
    95 ?>
    96 }}}
    97 This specifies a question where the student clicks on an image;
    98 a correct answer is a click in the indicated subrectangle
    99 ((0,0) is the upper left corner of the image).
    100 
    101 In addition to calling these functions,
    102 an exercise script can intersperse text among the questions.
    103 Example:
    104 {{{
    105 <?php
    106 echo 'Conifers are so named because:';
    107 exclusive_choice(
    108    'They carry their seeds in cones.'
    109    'They are cone-shaped.',
    110    'They originated during the Coniceous era.'
    111 );
    112 ?>
    113 }}}
    114 
    115154
    116155== Course documents ==