category-group: exam
layer: 8
header file(s): z_exam_html.h
libraries: libz00.lib libz01.lib libz02.lib libz03.lib libz04.lib libz05.lib libz06.lib libz07.lib libz08.lib synopsis.
This area has only 2 functions: examq_to_html()
exam_to_html() They are used in formatting an exam as an HTML page. [C] functions (aka subroutines):
examq_to_html()
SIGNATURE: int examq_to_html (const exam_question_o &q, string_o &s_out, const paramstring_o &eps, int *pexi)
SYNOPSIS: this routine is key to a web-base exam system. it controls all formatting of an exam question.
PARAMETERSRETURNS:
- q - the question to format (in its own object)
- s_out: (output var) the string, containing an HTML interpretation of the question
- eps - a list of options. supported values:
show_intro -- "yes" | "no"; the default is "no" show_choices -- "yes" | "no"; the default is "yes" if 'no', any multiple-choice selections are skipped (useful if you need just the question) reveal_all ...: "yes" | "no"; the default is "no" if 'yes', any revelation about the answer is displayed correct_color: the color of the text to put for correct choices extra_color -- the color of special choice to highlight extra_idx ...: the index # of the special choice- pexi - error indicator output variable. values:
0: ok; directory is bona-fide;
1: does not exist;
2: entry exists, but it is not a directory
0: success
-1: failure
exam_to_html()
SIGNATURE: int exam_to_html (const exam_o &x, string_o &s, const paramstring_o &eps, int *pie)
SYNOPSIS: format a set of test questions. The exam is put into "x", and should be complete. resultant output is put into "s".
PARAMETERSRETURNS:
- eps - options. currently there is only 1:
indent: [n > 0] number of chars to indent each question- pie - error indicator output variable. values:
0: ok; everything worked
1: bad input parameter (# chars to indent)
2: error in accessing tmp data-bag
0: success
-1: failure