我正在使用 Moodle 进行科目考试。我想将数字完形填空问题与单选题或多项选择题混合在一起。并且每道题的最终分数应该有不同的百分比,例如:第一道数字题5%,第二道数字题15%,第三道选择题20%,以此类推。我做了一个cloze_mchoice.Rnw
文件:
<<echo=FALSE, results=hide>>=
@
\usepackage{Sweave}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\SweaveOpts{pdf=false}
\begin{question}
%
%
This is the question. This is the question
\begin{answerlist}
\item Numerical answer 1. %Solution: 10
\item Numerical answer 2. %Solution: 20
\item Multiple choice answer 1. %true
\item Multiple choice answer 2. %true
\item Multiple choice answer 3. %false
\item Multiple choice answer 4. %false
\item Numerical answer 3. %Solution: 30
\item Numerical answer 4. %Solution: 35
\end{answerlist}
%
\end{question}
\exname{cloze_mchoice}
\extype{cloze}
\exclozetype{num|num|mchoice|num|num}
%percentage of rigth answer:
% (5%-15%-20%-25%-35%)
\exsolution{10|20|1100|30|35|}
\extol{0.1*10|0.1*20|0.1*30|0.1*35} %Numerical Answer Tolerance
首先,我使用 HTML 进行编译,但收到以下警告:
exams2html("cloze_mchoice.Rnw", encoding = "UTF-8", template = "plain8")
## Warning message:
## In do.call(paste("as", type, sep = "."), list(rval)) :
## NAs introduced by coercion
我一直在尝试编译成xml
使用
rmx <- exams2moodle("cloze_mchoice.Rnw", n = 1, name = "p_cloze_mchoice",
mchoice = list(abstention = "No answer."))
但我收到了上面显示的相同警告消息。p_cloze_mchoice.xml
Moodle 未读取该文件。
文件 Rnw 是一个模板,我将使用一个 csv 文件来导入输入数据和输出数据。