exams2ilias exports
exercises from R/exams to ILIAS question pools. The package
keeps the ILIAS-specific QTI 1.2 logic in one place and currently
targets the import structure validated against ILIAS 9.20.
The central interface is exams2ilias(). A minimal export
only needs an exercise file, an output directory, and a name for the
resulting question pool.
library(exams2ilias)
outdir <- tempfile("ilias-")
dir.create(outdir)
exams2ilias(
"lm.Rmd",
n = 1,
dir = outdir,
name = "lm_ilias"
)This creates a ZIP file that can be imported into an ILIAS question
pool. Exercises bundled with exams, such as
"ttest.Rmd" or "boxplots.Rmd", can be
addressed directly by file name.
By default, the package uses the bundled ILIAS template alias
"ilias", which currently resolves to the internal template
for ILIAS 9.20. You only need to set template explicitly if
you want to use your own XML template file.
The package ships with self-contained statistics exercises for the main question types:
example_dir <- system.file("exercises", package = "exams2ilias")
list.files(example_dir, pattern = "\\.[Rr]md$", full.names = TRUE)These exercises are intended both as smoke-tested templates and as a starting point for your own question authoring workflow.