我正在检查一些单选和多项选择的例子,例如 swisscapital.Rmd 和 switzerland.Rmd。在运行exams2moodle() 并检查一些参数时,我发现不正确的答案会被扣分(<answer fraction="-25" format="html">
例如在swisscapital.Rmd 中)。有没有办法将错误答案更改为 0 分?
的输出
exams2moodle("swisscapital.Rmd", n = 1, name = "swiss_test",
encoding = "UTF-8",
dir = "output",
edir = "exercises")
是swiss_test.xml
包含此内容的文件
<?xml version="1.0" encoding="UTF-8"?>
<quiz>
<question type="category">
<category>
<text>$course$/swiss_test/Exercise 1</text>
</category>
</question>
<question type="multichoice">
<name>
<text> Q1 : swisscapital </text>
</name>
<questiontext format="html">
<text><![CDATA[<p>
<p>What is the seat of the federal authorities in Switzerland (i.e., the de facto capital)?</p>
</p>]]></text>
</questiontext>
<generalfeedback format="html">
<text><![CDATA[<p>
<p>There is no de jure capital but the de facto capital and seat of the federal authorities is Bern.</p>
<ol type = "a">
<li> False </li>
<li> False </li>
<li> False </li>
<li> True </li>
<li> False </li>
</ol>
</p>]]></text>
</generalfeedback>
<penalty>0</penalty>
<defaultgrade>1</defaultgrade>
<shuffleanswers>false</shuffleanswers>
<single>true</single>
<answernumbering>abc</answernumbering>
<answer fraction="-25" format="html">
<text><![CDATA[<p>
Lausanne
</p>]]></text>
<feedback format="html">
<text><![CDATA[<p>
False
</p>]]></text>
</feedback>
</answer>
<answer fraction="-25" format="html">
<text><![CDATA[<p>
Basel
</p>]]></text>
<feedback format="html">
<text><![CDATA[<p>
False
</p>]]></text>
</feedback>
</answer>
<answer fraction="-25" format="html">
<text><![CDATA[<p>
St. Gallen
</p>]]></text>
<feedback format="html">
<text><![CDATA[<p>
False
</p>]]></text>
</feedback>
</answer>
<answer fraction="100" format="html">
<text><![CDATA[<p>
Bern
</p>]]></text>
<feedback format="html">
<text><![CDATA[<p>
True
</p>]]></text>
</feedback>
</answer>
<answer fraction="-25" format="html">
<text><![CDATA[<p>
Geneva
</p>]]></text>
<feedback format="html">
<text><![CDATA[<p>
False
</p>]]></text>
</feedback>
</answer>
</question>
</quiz>