exams2lops(file, n = 1L, nsamp = NULL, dir = ".", name = NULL,
quiet = TRUE, edir = NULL, tdir = NULL, sdir = NULL, solution = TRUE,
doctype = NULL, head = NULL, resolution = 100, width = 4,
height = 4, converter = "tex2image", base64 = FALSE,
auto_scramble = TRUE, ...) make_exams_write_lops(name = NULL, auto_scramble = TRUE, ...)
file
.file
. Sampling without replacement is used
if possible. (Only if some element of nsamp
is larger than
the length of the corresponding element in Sweave
?file
are stored (see also below).tempdir
.tempdir
.Sweave
.make_exercise_transform_html
.exams2lops
returns a list of exams as generated by xexams
.
make_exams_write_lops
eturns a function that generates the XML code
for the question in LOPS exam server format (WU Wien).exams2lops
will produce a .zip
file that may be uploaded. It proceeds by (1)
calling Sweave
on each exercise, (2) reading the resulting LaTeX code, (3)
transforming the LaTeX code to HTML, and (4) embedding the HTML code in a XML file using the
Moodle 2.3 standards for exams/quizzes. For steps (1) and (2) the standard drivers in xexams
are used. In step (3), a suitable
transformation function is set up on the fly using make_exercise_transform_html
, see also
the details section in exams2html
.
For step (4) a simple writer function is set up on the fly that embeds the transformed HTML code into the final XML files for each question and the exam.
Note that in make_exams_write_lops
only multiple and single choice questions are supported at
the moment, since the LOPS exam server format (WU Wien) is used to generate printed versions for large scale
multiple choice exams. In addition, only images of the question/questionlist/solution/solutionlist
should be generated, since the server has only minimum support for e.g. MathML markup used to
produce mathematical formulas.
xexams
,
ttm
,
tth
,
tex2image
,
make_exercise_transform_html
,## output directory
mydir <- tempdir()
## generate the exam
exams2lops(c("scatterplot", "boxplots"), dir = mydir)
dir(mydir)
Run the code above in your browser using DataLab