exams2inspera: Generation of Exams for Inspera

View source: R/exams2inspera.R

exams2insperaR Documentation

Generation of Exams for Inspera

Description

Automatic generation of exams in QTI 2.1 with some tweaks optimized for Inspera.

Usage

  exams2inspera(file, n = 1L, dir = ".", name = "inspera", template = "inspera",
    converter = "pandoc-mathml", base64 = FALSE, ...)

Arguments

file

character. A specification of a (list of) exercise files.

n

integer. The number of copies to be compiled from file.

dir

character. The default is the current working directory.

name

character. A name prefix for resulting exercises and ZIP file.

template

character. The QTI 2.1 template that should be used, defaulting to "inspera.xml" provided within the package.

converter

character passed on to make_exercise_transform_html, indicating the type of converter from LaTeX/Markdown to HTML. Defaults to HTML with MathML.

base64

logical. Should supplementary files be embedded using Base 64 coding? Currently only FALSE is supported by Inspera.

...

arguments passed on to exams2qti21, providing many further arguments for customization.

Details

exams2inspera is a convenience interface to exams2qti21 for generating QTI 2.1 output with some small tweaks for Inspera. Most importantly, no full "assessment" is exported but only a collection of individual exercises. Consequently, all options from exams2qti21 that pertain to the configuration of the assessment (e.g., maxattempts, cutvalue, navigation, etc.) have no effect here. Moreover, MathJax is used for type-setting mathematical content by default.

Value

exams2inspera returns a list of exams as generated by xexams.

See Also

exams2qti21

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", "confint2.Rmd"),
  c("regression.Rmd", "anova.Rmd"),
  c("scatterplot.Rmd", "boxhist.Rmd"),
  "relfreq.Rmd"
)

## output directory
dir.create(mydir <- tempfile())

## generate .zip with exercises for Inspera in temporary directory
exams2inspera(myexam, n = 3, dir = mydir)
dir(mydir)

exams documentation built on Aug. 5, 2024, 3 p.m.