category-group: exam
layer(s): 7, 8

header file(s): z_exam.h, z_exam_html.h

The exam object components are conceptually simple. To create an exam:

  • build an exam by setting up each exam question (exam_question_o) .
    by adding choices (exam_question_choice_o), the text of the question (exam_question_text_o), any intro it may have (exam_question_intro_o), and of course the choices (exam_question_choice_o). An object is instantiated for each of these elements.
  • Next create an exam question (exam_question_o) and add components to it using set_xxx() member functions.
  • Finally create an exam_o object-instance, and use the member funcdtion add_question() to add each question to it.

At layer 8, the exam group contains only the 2 functions "examq_to_html()" and "exam_to_html()". They exist to do a "generic" HTML format of exam questions:

examq_to_html() - controls formatting of an exam question
exam_to_html() - formats a set of test questions as HTML

classes in this group: exam_question_choice_o, exam_question_intro_o, exam_question_text_o,
                                      exam_question_o, exam_o

function groups:
                              layer 08 functions group

Exam objects are subclassed from the orthodox object. They are extremely amenable to permanent storage, ie, they can be easily written and retrieved from a database.