Next: Example Up: A Hyper-Text Tutorial Markup Previous: Background

The Markup Language

The authoring system is based on a script file that describes the tutorial in the form of lessons divided into parts. Each part may contain a question to be answered by the student. Along with the question itself, the script file describes what happens for both right and wrong answers to the question. This script file is given in the Hyper-Text Tutorial Markup Language (HTTML), an extension of the Hyper-Text Markup Language (HTML) intended to facilitate authoring interactive tutorials. It adds, to HTML, tags that delineate parts within a lesson and tags that describe short answer, one-of-many multiple choice and many-of-many multiple choice questions.

HTTML Specific Tags: The new tags which we have added to HTML describe the structure of a tutorial with most describing the question and answer part of a tutorial. These new tags include:

Delimit a lesson. A lesson represents a single session in the tutorial.
Delimit a part of a lesson. Parts are intended to be done in succession and are listed in the index.
Delimit a one-of-many multiple choice question. The multiple choice questions work much like lists in HTML.
Delimit a many-of-many multiple choice question.
Delimit a short answer question.
Identify a potential answer to a question. For multiple choice questions, the choices are listed as labels beside buttons in the browser. For short answer questions, choices are regular expressions that define specifically recognized answers.
Mark this answer as a correct one. For many-of-many multiple choice questions, all right answers must be marked for the question to be counted correct. For one-of-many multiple choice questions, any of the right answers will be accepted. The default behavior of a right tag is as if it had been given as <right next> indicating that if the right answer(s) are given, then the tutorial moves on to the next part. Alternatively, another page may be identified with a syntax similar to the anchor tag, i.e. <right href=...>.
Mark this answer as a wrong one. Unlike the right tag, any wrong answer given will result in the question being declared wrong regardless of the type of question. The wrong tag may also be used with the same destination specifiers as in the right tag and can also repeat. The default behavior for wrong tags is to repeat.

Grammar for HTTML Tags: In this subsection, we present a YACC-like grammar for the new tags introduced for HTTML. The grammar as actually used includes productions that absorb any errors and attempts to move through them making a best-guess attempt at output rather than issuing error messages to the user.

If the input contains no HTTML specific tags, we want it to be output without change. Alternatively, the file may contain one or more lessons.

file:   /* nothing */
   | file OTHER | file OTHER_TAG
   | file lesson ;

Each lesson in the file contains zero or more parts. The parts that make up a lesson may in part or in whole be normal HTML code not delimited by the <part> and </part> tags. Such code is included in the index file that is created from the HTTML code.

lesson: LESSON parts END_LESSON ;
parts: /* nothing */ | parts part
   | parts OTHER | parts OTHER_TAG ;
part: PART part_body END_PART ;

Each part will typically consist of some HTML code which teaches some particular concept followed by a question.

part_body: /* nothing */
  | part_body OTHER        | part_body OTHER_TAG
  | part_body omc_question | part_body mmc_question
  | part_body sa_question  ;

The questions all have pretty much the same structure, namely the text of the question followed by zero or more choices for the answer. The question text is given in normal HTML code.

omc_question: OMC_QUESTION question_head
   omc_body END_OMC_QUESTION ;
question_head: /* nothing */
  | question_head OTHER | question_head OTHER_TAG ;
omc_body: /* nothing */
  | omc_body choice ;
The many-of-many and short answer questions are handled similarly.

Each choice for an answer is labeled as either right or wrong, and each has a response associated with it. For each choice, there is also an indication of what page we should point to next. These can be specified by the use of the next and repeat keywords. Using an href= in the tag, we can also specify an arbitrary next page.

choice: CHOICE choice_body RIGHT response
   | CHOICE choice_body RIGHT_NEXT response
   | CHOICE choice_body RIGHT_REPEAT response
   | CHOICE choice_body RIGHT_HREF response
choice_body: /* nothing */
 | choice_body OTHER | choice_body OTHER_TAG ;
The ... contains choice options for wrong answers that parallel those for right answers, and the grammar for response looks like that for choice_body.

HTTML Processor: A file of HTTML code is processed by a translator that produces a collection of HTML files and CGI script files. It has a parser implemented in YACC. The parser collects the HTML portions of the file and writes them to several HTML output files. For the entire tutorial script, an index file is written that is divided into lessons and parts within each lesson. Each part of a lesson is written to its own file and many of the responses are written to files.

For each question, an HTML form is written to the output for the file that contains the question. In addition to the HTML form, the translator produces the source code for a CGI script that processes the form. The translator component that generates the CGI source code forms a back-end analogous to a code generator in a compiler. At the present time, we have implemented two such back-ends for the HTTML translator. The first back-end produces CGI scripts in Lex following the form used in our original C programming tutorial. We have also written a back-end that produces AppleScript code for the CGI scripts so that they may be run on the Apple Macintosh.

Next: Example Up: A Hyper-Text Tutorial Markup Previous: Background

Brian L. Stuart
Fri Apr 11 11:05:45 CDT 1997