我正在检查一些单选和多选的示例,例如swisscapital.Rmd和switzerland.Rmd。当运行exams2moodle()并检查一些参数时,我发现错误的答案会受到负面影响(例如,swisscapital.Rmd中的<answer fraction="-25" format="html">
)。有没有办法将答案更改为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>
答案 0 :(得分:2)
您可以检查help of exams2moodle:
规则:该字符指定用于否定部分的规则 学分。见函数exams_eval
在exams_eval中:
“ none”使用0(因此错误选择完全无效)
所以您应该这样做:
exams2moodle(..., schoice = list(eval = exams_eval(rule = "none")))
另请参阅Grading multiple choice and cloze questions created with exams2moodle()。