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:
<single>...</single> to <single>true</single>, and
modifies the attribute fraction in the tags <answer fraction="...">...</answer>.
If fraction is less than 0, it is set to zero, and if fraction is greater than 0, it is set to 100.
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)
Value
Invisibly, the written file name.
Arguments
file
character: Moodle XML file with exercises to read from
newfile
character: Moodle XML file to write in (default: file)