exams2openolat {exams} | R Documentation |
Automatic generation of exams in QTI 2.1 (or 1.2) with some tweaks optimized for OpenOLAT.
exams2openolat(file, n = 1L, dir = ".", name = "olattest", qti = "2.1", converter = "pandoc-mathjax", table = TRUE, maxattempts = 1, ...)
file |
character. A specification of a (list of) exercise files. |
n |
integer. The number of copies to be compiled from |
dir |
character. The default is the current working directory. |
name |
character. A name prefix for resulting exercises and ZIP file. |
qti |
character indicating whether QTI |
converter |
character passed on to |
table |
logical or character. Should a dedicated table class be used in the HTML for OpenOLAT? For details see below. |
maxattempts |
integer. The maximum attempts for one question
(must be smaller than |
... |
arguments passed on to |
exams2openolat
is a convenience interface to exams2qti12
and exams2qti21
for generating either QTI 1.2 or 2.1
(default) output with some small tweaks for OpenOLAT. Specifically, the MathJax
output from pandoc is post-processed as expected by OpenOLAT.
Dedicated table
classes currently include: Full-width tables with borders
("b_grid"
, "b_border"
) or without ("b_full"
, "b_borderless"
).
Or regular tables without background color ("b_middle"
) or with white grid
and color background ("b_gray"
, "b_red"
, "b_green"
, "b_blue"
,
"b_yellow"
). Setting table = TRUE
corresponds to table = "b_gray"
.
exams2openolat
returns a list of exams as generated by xexams
.
## load package and enforce par(ask = FALSE) library("exams") options(device.ask.default = FALSE) ## define an exams (= list of exercises) myexam <- list( "boxplots", c("tstat", "ttest", "confint"), c("regression", "anova"), c("scatterplot", "boxhist"), "relfreq" ) ## output directory dir.create(mydir <- tempfile()) ## generate .zip with OpenOLAT test in temporary directory exams2openolat(myexam, n = 3, dir = mydir) dir(mydir)