exams2openolat {exams} | R Documentation |
Generation of Exams for OpenOlat
Description
Automatic generation of exams in QTI 2.1 (or 1.2) with some tweaks optimized for OpenOlat.
Usage
exams2openolat(file, n = 1L, dir = ".", name = "olattest",
qti = "2.1", config = TRUE, converter = "pandoc-mathjax", table = TRUE,
maxattempts = 1, cutvalue = NULL, ...)
openolat_config(cancel = FALSE, suspend = FALSE, scoreprogress = FALSE,
questionprogress = FALSE, maxscoreitem = TRUE, menu = TRUE,
titles = TRUE, notes = FALSE, hidelms = TRUE, hidefeedbacks = FALSE,
blockaftersuccess = FALSE, attempts = 1, anonym = FALSE,
manualcorrect = FALSE)
Arguments
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 |
config |
logical or named list with arguments to be passed to
function |
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 within an exam.
Set to |
cutvalue |
numeric. The number of points at which the exam is passed. If set to
|
... |
arguments passed on to |
cancel |
logical. Are participants allowed to cancel an exam after starting it?
(Default: |
suspend |
logical. Are participants allowed to suspend an exam after starting it
(in order to continue it later)? (Default: |
scoreprogress |
logical. Should the progress of the score/points achieved so far
be displayed during the exam? (Default: |
questionprogress |
logical. Should the number of questions solved so far be
displayed during the exam? (Default: |
maxscoreitem |
logical. Should the maximum score of a question/item be displayed?
(Default: |
menu |
logical. Should the menu be displayed during the exam? (Default: |
titles |
logical. Should question titles be displayed during the exam?
(Default: |
notes |
logical. Should participants be enabled to take notes in OpenOlat during
the exam? (Default: |
hidelms |
logical. Should access to the OpenOlat learning management system be
hidden during the exam? (Default: |
hidefeedbacks |
logical. Should feedbacks be hidden? (Default: |
blockaftersuccess |
logical. Should the exam be blocked after successful completion?
(Default: |
attempts |
integer. How many attempts are allowed for the exam as a whole?
Note that this should not be confused with the |
anonym |
logical. Should anonymous users be allowed to take the exam? (Default: |
manualcorrect |
logical. Should the points and pass/fail status from the exam
be evaluated manually? (Default: |
Details
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
and table output from pandoc is post-processed as expected by OpenOlat. See the
corresponding manual page for many more arguments that are supported by
exams2openolat
.
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"
.
In addition to controlling the behavior of the exam and its questions via the standard
QTI 2.1 options (see exams2qti21
), it is possible to specify
certain OpenOlat-specific configurations via an additional XML file to be added to the
ZIP output. This is why these options are not part of exams2qti21
but are provided in the
separate wrapper function openolat_config
. As the resulting XML configuration file
is not part of the official OpenOlat interface, it may be subject to more changes in the future.
Value
exams2openolat
returns a list of exams as generated by xexams
.
See Also
Examples
## load package and enforce par(ask = FALSE)
library("exams")
options(device.ask.default = FALSE)
## define an exams (= list of exercises)
myexam <- list(
"boxplots.Rmd",
c("tstat.Rmd", "ttest.Rmd", "confint.Rmd"),
c("regression.Rmd", "anova.Rmd"),
c("scatterplot.Rmd", "boxhist.Rmd"),
"relfreq.Rmd"
)
## output directory
dir.create(mydir <- tempfile())
## generate .zip with OpenOlat test in temporary directory
exams2openolat(myexam, n = 3, dir = mydir)
dir(mydir)