The Lesson unit

A course is divided into Lessons. Each Lesson is defined using a Lesson unit. At a minimum, a Lesson unit only needs to specify the Lesson’s internal name (the one that is used in Prompts, to say which Lesson they belong to), and its external name (the one that is shown in the Lesson tab). So for example the one Lesson unit in the Hello world course from Level 1 is:

Lesson
Name           hello_world
PrintName      Hello world
EndLesson

If the lesson uses scripts or badges, these also have to be declared. A more complicated Lesson declaration might look like this:

Lesson
Name           hotel
PrintName      Hotel booking
Description    Simple hotel booking dialogue
Badges         default
Script         hotel_booking_negotiation
EndLesson

In a little more detail, a Lesson consists of a number of lines, starting with a line containing the single word “Lesson” and ending with a line containing the single word “EndLesson”. The other lines have the following meanings:

Name

A typical Name line is:

Name           hotel

This says that the internal identifier for the Lesson is hotel. This identifier is used to mark which Prompts belong to the Lesson. A Lesson must have exactly one Name line, and the identifier must not contain spaces.

PrintName

A typical PrintName line is:

PrintName       Hotel booking

This says that the text which will be shown in the lesson menu is Hotel booking. A Lesson must have exactly one PrintName line. The print name can be any piece of text short enough to fit on a menu line.

Description

A Lesson can include a Description line. This is a longer piece of text saying what the lesson is for, which will be displayed in some contexts. A typical example looks like this:

Description     Simple hotel booking dialogue

A Lesson can have at most one Description line.

Script

A Lesson which uses a script (see Level 4) must have a Script line. This gives the name of the script, without the .xml extension. The script must be placed in the course’s multimedia directory.

A typical Script line looks like this:

Script          hotel_booking

A Lesson can have at most one Script line.

HelpFile

The HelpFile declaration associates a file of written content with the lesson. Help files are HTML files which need to be put in the doc subdirectory for the course. A typical help file declaration looks like this:

HelpFile       present.html

MaxTries

The number of times the student can attempt a response before the course advances to the next step. The default is 3. Example:

MaxTries      2

If MaxTries is specified at both Course and Lesson level, Lesson takes priority.

RecMessage

You can customize recognition feedback using a RecMessage line. If the value includes the string RECRESULT, then the recognition result will be substituted. For example, the line

RecMessage     I think I heard "RECRESULT"

means that the system will for example display the text

I think I heard "A cat"

where normally it would have displayed

A cat

If you have an empty RecMessage line, i.e. just

RecMessage

then the system displays no recognition result.

If RecMessage is specified at both Course and Lesson level, Lesson takes priority.

RecMessageAccept and RecMessageReject

It’s possible to have different messages for accepted and rejected responses. To do this, replace the single RecMessage line with two lines starting RecMessageAccept and RecMessageReject repectively, for example

RecMessageAccept     I think I heard "RECRESULT"... correct
RecMessageReject     I think I heard "RECRESULT"... WRONG!!

If the system would normally have displayed

A cat

it will now display the text

I think I heard "A cat"... correct

for an accepted response, and

I think I heard "A cat"... WRONG!!

for a rejected response.

If RecMessageAccept or RecMessageReject is specified at both Course and Lesson level, Lesson takes priority.

EndMessage and NextLesson

When the student reaches the end of a lesson, the default behavior is to show a message saying End of lesson and then offer to go to the lesson menu. You can specify the message by adding an EndMessage line, e.g.

EndMessage       Congratulations, you have finished the third lesson!

You can also add a NextLesson line in the Lesson unit, e.g.

NextLesson       lesson4

This makes the system immediately jump to the designated lesson after showing the popup.

AutoAdvance

Add the line

AutoAdvance    no

to stop the system automatically advancing to the next example on success.

CanMoveForward and CanMoveBack

Add the line

CanMoveForward no

to stop the student from using the forward arrow.

Add the line

CanMoveBack no

to stop the student from using the back arrow.

ShowHelp

By default, the system shows one audio help example in response to a Help request. You are able to change this by adding a ShowHelp line to the Course unit. So for example if you add the line

ShowHelp       2

then the student will be shown two audio help examples, if at least two are defined.

If you add the line

ShowHelp       0

then the student will be shown no audio help examples.

Badges

A Lesson which uses badges (see Level 5) must have a Badges line.

The simplest form of a Badges line is:

Badges          default

which says that default badges will be displayed. If you wish to supply your own badges, you need to create suitable image files, put them in the multimedia directory, and include a Badges line which lists them. The form of the line must be:

Badges          plain_0 plain_4 bronze_0 bronze_1 bronze_2 bronze_4 silver_0 silver_1 silver_2 silver_4 gold_0 gold_1 gold_2 gold_4

listing a total of 14 badges for the lesson.