| 1 | = Bolt reference manual = |
| 2 | |
| 3 | A Bolt course consists of: |
| 4 | |
| 5 | * '''Lessons''': any web-based teaching material |
| 6 | * '''Exercises''', used for reinforcement and/or assessment. |
| 7 | * A '''course document''' describing the order in which lessons and exercises are shown. |
| 8 | |
| 9 | == Lessons == |
| 10 | |
| 11 | A '''Lesson''' contains instructional material. |
| 12 | It may be either an HTML or PHP file. |
| 13 | It may contain embedded audio, video, Flash, or any other content. |
| 14 | Some restrictions: |
| 15 | |
| 16 | * It shouldn't contain enclosing <html> or <body> tags (Bolt will supply these, as well as navigational header and footer). |
| 17 | * It shouldn't contain any hyperlinks (Bolt will supply navigational links). |
| 18 | |
| 19 | If a lesson is implemented as a PHP script, information about the student is available to it |
| 20 | in a global variable $student, |
| 21 | This information may be used to customize the page. |
| 22 | The available information is: |
| 23 | {{{ |
| 24 | $student.sex; // 0=unknown, 1=male, 2=female |
| 25 | $student.age; // in years |
| 26 | $student.country; |
| 27 | }}} |
| 28 | |
| 29 | For example, suppose you want to use a larger font for students over 50: |
| 30 | {{{ |
| 31 | if ($student.age > 50) { |
| 32 | echo "<style> |
| 33 | body {font-size: large;} |
| 34 | </style> |
| 35 | "; |
| 36 | } |
| 37 | }}} |
| 38 | |
| 39 | Note: an alternative way to vary content based on student attributes is |
| 40 | to use separate lesson files, selected in the course document. |
| 41 | |