| exams2ilias | R Documentation |
Unfinished interface for automatic generation of exams in QTI 1.2 for the learning management system ILIAS.
exams2ilias(file, n = 1L, nsamp = NULL, dir = ".",
name = NULL, quiet = TRUE, edir = NULL, tdir = NULL, sdir = NULL,
verbose = FALSE, resolution = 100, width = 4, height = 4, svg = FALSE,
encoding = "UTF-8", num = list(fix_num = FALSE, minvalue = NA),
mchoice = list(maxchars = c(3, NA, 3), minvalue = NA),
schoice = mchoice, string = NULL, cloze = NULL,
template = "ilias",
duration = NULL, stitle = "Exercise", ititle = "Question",
adescription = "Please solve the following exercises.",
sdescription = "Please answer the following question.",
maxattempts = 1, cutvalue = 0, solutionswitch = TRUE, zip = TRUE,
points = NULL, eval = list(partial = TRUE, negative = FALSE),
converter = "pandoc-mathjax", xmlcollapse = TRUE,
metasolution = FALSE, ...)
file |
character. A specification of a (list of) exercise files. |
n |
integer. The number of copies to be compiled from |
nsamp |
integer. The number(s) of exercise files sampled from each
list element of |
dir |
character. The default is the current working directory. |
name |
character. A name prefix for resulting exercises and ZIP file. |
quiet |
logical. Should output be suppressed when calling
|
edir |
character specifying the path of the directory (along with its
sub-directories) in which the files in |
tdir |
character specifying a temporary directory, by default
this is chosen via |
sdir |
character specifying a directory for storing supplements, by
default this is chosen via |
verbose |
logical. Should information on progress of exam generation be reported? |
resolution, width, height |
numeric. Options for rendering PNG (or SVG)
graphics passed to |
svg |
logical. Should graphics be rendered in SVG or PNG (default)? |
encoding |
character, ignored. The encoding is always assumed to be UTF-8. |
num |
function or named list applied to numerical (i.e., type |
mchoice, schoice, string, cloze |
function or named list applied to multiple choice,
single choice, string, and cloze questions (i.e., type |
template |
character. The IMS QTI 1.2 or 2.1 template that should be used. Currently,
the package provides |
duration |
integer. Set the duration of the exam in minutes. |
stitle |
character. A title that should be used for the sections. May be a vector of length 1 to use the same title for each section, or a vector containing different section titles. |
ititle |
character. A title that should be used for the assessment items. May be a vector of length 1 to use the same title for each item, or a vector containing different item titles. Note that the maximum of different item titles is the number of sections/questions that are used for the exam. |
adescription |
character. Description (of length 1) for the overall assessment (i.e., exam). |
sdescription |
character. Vector of descriptions for each section, omitted if empty
(or |
maxattempts |
integer. The maximum attempts for one question. This may also be a vector
so that the maximum number of attempts varies across questions. A value of |
cutvalue |
numeric. The cutvalue at which the exam is passed. |
solutionswitch |
logical. Should the question/item solutionswitch be enabled?
In OLAT this means that the correct solution is shown after an incorrect solution
was entered by an examinee (i.e., this is typically only useful if |
zip |
logical. Should the resulting XML file (plus supplements) be zipped? |
points |
integer. How many points should be assigned to each exercise? Note that this
argument overules any exercise points that are provided within an |
eval |
named list, specifies the settings for the evaluation policy, see function
|
converter |
character. Argument passed on to |
xmlcollapse |
logical or character. Should line breaks be collapsed in the XML
code. If |
metasolution |
logical. Should the solution be added to the XML output as qtimetadata tag? This currently only works for ILIAS essay questions. |
... |
further arguments passed on to |
exams2ilias is a convenience interface to exams2qti12
which tries to generate QTI 1.2 with some tweaks for ILIAS (https://www.ilias.de/).
Unfortunately, there is no good documentation of the precise QTI 1.2 format
required by ILIAS and hence many features do not work at all or not reliably.
What had been tested most extensively in 2020/21 (during the COVID-19 pandemic), are string questions with open answers and solutions; these are rendered into ILIAS essay questions within a question pool. Also mchoice and schoice questions used to render in ILIAS. However, in more recent versions of ILIAS they may not fully correctly.
Numeric and cloze questions have not been explored and do not work yet.
exams2ilias returns a list of exams as generated by xexams.
If zip is TRUE (default), an ILIAS Questionpool object is generated.
exams2qti12,
## load package and enforce par(ask = FALSE)
library("exams")
options(device.ask.default = FALSE)
## define an exams (= list of exercises)
myexam <- list(
## multiple-choice with graphics
c("boxplots.Rmd", "scatterplot.Rmd"),
## multiple-choice with output or tables
c("ttest.Rmd", "anova.Rmd", "relfreq.Rmd"),
## single-choice
c("deriv2.Rmd", "swisscapital.Rmd"),
## string (closed)
"function.Rmd",
## string (open-ended)
"essayreg.Rmd"
)
## output directory
dir.create(mydir <- tempfile())
## generate .zip with ILIAS Questionpool in temporary directory
## using a few customization options
exams2ilias(myexam, n = 3, dir = mydir,
maxattempts = 3,
num = list(digits = 1),
mchoice = list(shuffle = TRUE, enumerate = FALSE),
solutionswitch = FALSE
)
dir(mydir)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.