moodle_m2s {exams.forge}R Documentation

Moodle Multiple-Choice

Description

The exams package does not support multiple-choice questions with multiple correct answers; it only allows for one answer to be chosen. However, Moodle does support such questions. The function reads the XML file generated by exams.forge and makes changes for all mchoice questions:

If the file does not end with .xml, then .xml is appended. At the end, the modified XML code is stored in newfile.

Usage

moodle_m2s(file, newfile = NULL, verbose = 1)

mchoice_moodle(file, newfile = NULL, verbose = 1)

Arguments

file

character: Moodle XML file with exercises to read from

newfile

character: Moodle XML file to write in (default: file)

verbose

integer: output generation (default: 1)

Value

Invisibly, the written file name.

Examples

if (interactive()) {
  newfile <- tempfile(fileext=".xml")
  moodle_m2s(system.file("xml", "klausur-test.xml", package="exams.moodle"), newfile=newfile)
  file.edit(newfile)
}

[Package exams.forge version 1.0.10 Index]