1

我正在检查一些单选和多项选择的例子,例如 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>
4

1 回答 1

2

您可以查看Exams2moodle 的帮助

rule : 指定用于负部分信用的规则的字符。见函数exams_eval

Exams_eval 中

而“none”使用 0(因此错误的选择完全没有效果)

所以你应该这样做:

exams2moodle(..., schoice = list(eval = exams_eval(rule = "none")))

有关更多详细信息,另请参阅为使用 Exams2moodle() 创建的多项选择和完形填空题评分

于 2020-08-05T19:48:08.713 回答