Level 2: Multimedia

At Level 1, the system prompts the student using a piece of text. In Level 2, this is augmented by allowing the prompt also to include a recorded multimedia (video or audio) file. The course designer collects the files, uploads them to the course’s multimedia directory, and then adds a line to each prompt to say which file it is associated with. When the course is accessed, the prompt is given by playing the multimedia file in one pane of the browser and showing the text in the other.

A simple example appears immediately below: an English-only game where the student has to name the thing shown in the picture, following an English-language text instruction. You can run this course by going to the English Picture Game server on the demos and resources page and choosing the visual1 course. A typical prompt is the following:

Prompt
Lesson         animals
Group          1
Multimedia     cat.png
Text/english   What is it?
Response       a cat
Response       it's a cat
EndPrompt

Here, the user is shown the picture cat.png and the text What is it?; they are supposed to reply “a cat” or “it’s a cat”. The next section presents the details.

A simple multimedia course

The course is very simple, and consists of two Lessons and four Prompts. The first lesson is about identifying animals: the student is in turn shown pictures of a cat and a dog, and has to name them. The second lesson is about identifying movie stars; here, the student has to identify Brad Pitt and Angelina Jolie. Even though the course, as presented, is trivial, it could be quite useful if a few more animals or movie stars were added. It would also be simple to include more lessons.

The course starts as usual with a Course unit, as follows:

# ---------------------------------------------------
# Course

# One course, 'visual'

Course
Name           visual
Client         multimedia_client
L2             english
Languages      english
EndCourse

This is just like the Course unit we saw in the Hello World course, except for the line Client        multimedia_client. This tells the server that the course has to be displayed in a window which is able to show pictures as well as text.

Next, we have two Lesson units, for the two lessons animals and stars. These are just the same as the Lesson unit we saw in Hello World.

# ---------------------------------------------------
# Lessons

# Two lessons

Lesson
Name           animals
PrintName      Animals
Description    Identify animals
EndLesson

Lesson
Name           stars
PrintName      Stars
Description    Identify movie stars
EndLesson

Finally, we have the four Prompt units:

# ---------------------------------------------------
# Prompts

# Identify animals

Prompt
Lesson         animals
Group          1
Multimedia     cat.png
Text/english   What is it?
Response       a cat
Response       it's a cat
EndPrompt

Prompt
Lesson         animals
Group          2
Multimedia     dog.png
Text/english   What is it?
Response       a dog
Response       it's a dog
EndPrompt

# Identify stars

Prompt
Lesson         stars
Group          1
Multimedia     angelina_jolie.jpg
Text/english   Who is she?
Response       angelina jolie
Response       it's angelina jolie
EndPrompt

Prompt
Lesson         stars
Group          2
Multimedia     brad_pitt.jpg
Text/english   Who is he?
Response       brad pitt
Response       it's brad pitt
EndPrompt

These are again similar to the Prompts we saw in the Hello World course, with a couple of minor differences. First, each Prompt contains a Multimedia line identifying the relevant picture file. Second, the Group lines do not all have the same value; in each lesson, one Prompt has a Group value of 1, and the other one has a value of 2. In each case, the Prompt marked 1 will be shown before the one marked 2.

The only part of this that isn’t obvious is where to put the picture files. They need to be placed in a directory called multimedia, which is a sister of the grammars directory which contains the course description. So if we say that the namespace directory is mynamespace, the course directory is visualcourse and the course description is put in a file called visual.txt, the directory structure will look like this:

                mynamespace
                   |
          ------------------
          |
      visualcourse
          |
   ----------------
   |              |
grammars      multimedia

visual.txt     cat.png
               dog.png
               brad_pitt.jpg
               angelina_jolie.jpg

with one file in the grammars directory and four in the multimedia directory.