exams2wooclap: Generation of Quizzes for Wooclap

View source: R/exams2wooclap.R

exams2wooclapR Documentation

Generation of Quizzes for Wooclap

Description

Automatic generation of quizzes in Moodle XML format with some tweaks (still under development) for the audience response system Wooclap.

Usage

  exams2wooclap(file, n = 1L, dir = ".", name = "moodletowooclap", ...)

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 XML file.

...

arguments passed on to exams2moodle.

Details

exams2wooclap is a convenience interface to exams2moodle for generating Moodle XML with some small tweaks for Wooclap (https://www.wooclap.com). (For the most recent description of the compatibility between the Moodle and Wooclap platforms see https://docs.wooclap.com/en/articles/1980934-can-i-move-questions-from-wooclap-to-moodle, and the link to the Google doc under 'Step 1: Export Moodle questions to Moodle XML format'.) At the moment the supported exercise types are num, schoice, mchoice, and string. There is only limited support for cloze exercises.

The Wooclap-specific tweaks currently include:

  • The Wooclap system does not properly render html-<pre> environments and requires an additional adjustment of the Moodle XML.

Technical notes: As Wooclap only allows for very basic markup, the format of tables created with LaTeX or Markdown gets lost in the conversion. Also, for numerical questions the tolerance is not picked up when uploading into Wooclap. Note that these issues do not originate from exams2wooclap, but are a result of imperfections in Wooclap. The Wooclap project team has expressed that fixing the latter issue has limited priority for future improvements.

Value

exams2wooclap returns a list of exams as generated by xexams.

References

Wooclap (2025). Event features and settings. Available at https://docs.wooclap.com/en/collections/2357545-event-features-and-settings

Zeileis A, Umlauf N, Leisch F (2014). Flexible Generation of E-Learning Exams in R: Moodle Quizzes, OLAT Assessments, and Beyond. Journal of Statistical Software, 58(1), 1–36. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v058.i01")}.

See Also

exams2moodle

Examples


## load package and enforce par(ask = FALSE)
library("exams")
options(device.ask.default = FALSE)

## define an exams (= list of exercises)
myexam <- c(
  "boxplots.Rmd",
  "tstat.Rmd",
  "ttest.Rmd",
  "relfreq.Rmd"
)

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

## generate .xml with Wooclap quiz in temporary directory
exams2wooclap(myexam, dir = mydir)
dir(mydir)


exams documentation built on April 27, 2026, 3:02 a.m.