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, ...)

  openolat_config(cancel = FALSE, suspend = FALSE, scoreprogress = FALSE,
    questionprogress = FALSE, maxscoreitem = FALSE, menu = TRUE,
    titles = TRUE, notes = FALSE, hidelms = TRUE, hidefeedbacks = FALSE,
    blockaftersuccess = FALSE, attempts = 1, anonym = FALSE,
    signature = FALSE, signaturemail = FALSE, resultsonfinish = TRUE,
    itemback = FALSE, itemresethard = FALSE, itemresetsoft = FALSE,
    itemskip = FALSE, passedtype = "none", metadata = FALSE,
    sectionsummary = TRUE, questionsummary = FALSE, usersolutions = TRUE,
    correctsolutions = TRUE, questions = 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.

qti

character indicating whether QTI "1.2" or "2.1" (default) should be generated.

config

logical or named list with arguments to be passed to function openolat_config, see below. When using the config argument a XML file named QTI21PackageConfig.xml will be written to the final directory.

converter

character passed on to make_exercise_transform_html, indicating the type of converter from LaTeX/Markdown to HTML. Defaults to HTML with MathJax (and OpenOlat-specific fixups).

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. Set to 0 for unlimited attempts. For a finite number of attempts this must be smaller than 100000.

...

arguments passed on to exams2qti12 or exams2qti21, respectively.

cancel

logical, whether the test may be canceled.

suspend

logical, whether the test may be suspended.

scoreprogress

logical, should score be shown when running the exam.

questionprogress

logical, should the number of solved questions be shown during the exam.

maxscoreitem

logical, should the maximum score of the item be shown.

menu

logical, should the menu be shown.

titles

logical, should titles be shown.

notes

logical, should notes be allowed.

hidelms

logical, hide the OLAT LMS.

hidefeedbacks

logical, should feedback ne displayed.

blockaftersuccess

logical, is the test blocked after successful completion.

attempts

integer, how many attempts are allowed for the test.

anonym

logical, can the test be taken as an anonymous user.

signature

logical, should signatures of users be allowed.

signaturemail

logical, similar as above.

resultsonfinish

logical, should results after finishing the test be displayed.

itemback

logical

itemresethard

logical

itemresetsoft

logical

itemskip

logical, can items be skipped.

passedtype

character, which passed type should be displayed after completion of the test.

metadata

logical

sectionsummary

logical, should section summaries be displayed after completion of the test.

questionsummary

logical, should question summaries be displayed after completion of the test.

usersolutions

logical, should the user solutions be displayed after completion of the test.

correctsolutions

logical, should the correct solutions be displayed after completion of the test.

questions

logical

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 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".

Function openolat_config generates XML code that controls the overall options of the test.

Value

exams2openolat returns a list of exams as generated by xexams.

See Also

exams2qti12, 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",
  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)


[Package exams version 2.4-0 Index]