universal output XML format. The generator allows
processing a question requiring a numeric answer
(NUM), a question with a short answer (SA) and a
question with a multiple choice answer (MC). The
possibility of processing a question with the
embedded answer is very important. This type of
question can consist of all the 3 above mentioned
question types.
The question generator inserts the generated
input data into the question text and then the
generator inserts this text together with any possible
comments to the template of the requested question
and the output results, calculated by the solver as
answer (problem solution), as well. In case of a
NUM problem the generator inserts the answers only
for one question; in case of a close question it inserts
the answers for more questions. The applied
approach allows to determine more answers for a
NUM question with the level of validity. The output
of the question generator is a XML file in the
universal proposed format that is possible to
transform to the format of the selected LMS by
means of a particular question template.
In the paper the output to the Moodle XML
format is shown. The universal output format is also
suitable for the processing methods that we describe
below as another possibility how to process the
generated document. The whole process is described
in Figure 1.
3 AN EXAMPLE
OF THE GENERATION
PROCESS
First of all let us present an example of a simple
question with a numeric answer, a short answer or a
multiple choice answer. The first input to the whole
generation process is the question text with variable
input parameters. An example of such input text is
shown in the below listing. The variable input
parameters are marked with symbols ## on both
sides. In the given listing variables ##loan##,
##period2## can be found for example.
A property worth $##loan## is sold for
$##advance_payment## down and equal
payments at the ##end_begin## of
##period2## for the next
##number_years## years. Find the
##period4## payment if the interest
rate is
j<low_index>##interest_frequence##</low
_index> = ##ratio##~%.
The input data generator generates the input data
and it sends them to the solver. The output data i.e.
the solution of a problem and the generated input
data are the results of the solver process and they are
the input of the question generator together with the
question type template and the comments on the
problem solution. The result of the question
processing is the universal XML structure of the
final question. The next listing shows the main parts
of one generated question. We can see the main tag
<question>, tag <questiontext> with the question
text and the tag <answer> with a question numeric
answer. The variable input parameters in the
question text were substituted by the values
generated by the input data generator.
<question type="numerical" score="1">
<name>
<text>General annuity 10 - 1</text>
</name>
<questiontext format="html"><text>
A property worth $19000 is sold for
$1800 down and equal payments at the
beginning of year for the next 5 years.
Find the year payment if the interest
rate is j<low_index>12</low_index> =
3.15 %.</text></questiontext>
....
<answer><answertext>3660</answertext>
<tolerance>1</tolerance>
....
</answer>
....
</question>
The result of the question generator can be
transformed into the requested output format in the
transformation process with the help of the XSLT
processor and the XSL template file according to the
output format (Kosek, 2007). The next listing shows
one of the possible output formats – Moodle XML
format. The transformation of tag <low_index> to
html tag <sub> is obvious.
<question type="numerical" score="1">
<name>
<text> General annuity 10 - 1</text>
</name>
<questiontext><text>A property worth
$19000 is sold for $1800 down and equal
payments at the beginning of year for
the next 5 years. Find the year payment
if the interest rate is
j<sub>12</sub> = 3.15 %.
</text></questiontext>
....
<answer>3660
<tolerance>1</tolerance>
....
</answer>
....
</question>
CSEDU 2011 - 3rd International Conference on Computer Supported Education
266