我希望动态创建section,而不是从.Rnw文件创建。它可以用stitle的exams2moodle()参数来实现。
stitle应该基于目录结构,我希望从.Rnw文件中添加exname的值。
我认为应该使用read_metainfo,它也返回exname的值。如果不使用\Sexpr,则工作正常,但如果\Sexpr出现在\exsolution{...}中,则删除一个错误:
Error in string2num(exsolution) :
all numeric items must be finite and non-missing
Calls: read_exercise ->
当我在我的$$\mathbf文件中有$${x}$$,并在pandoc转换器中使用exams2moodle时,该xml文件包含一个"“字符,在moodle导入测试问题之前,该字符需要替换为"x”字符(因为moodle会给出一个错误,说明该文件不是没有BOM的UTF-8 )。
我想知道最实际的解决办法是什么?这是个虫子吗?谢谢!
最小示例:下面是minimal_example.Rmd
Question
========
Stare hard at the variable.
$$\mathbf{x}$$
What is its value?
Solution
========
我想用R-exams to Moodle创建问题。在我的例子中,我希望使用cloze类型并将答案嵌入到数学模式中: <<echo=FALSE,hide=TRUE>>=
@
\exname{foo}
\exsection{bar}
\extype{cloze}
\exclozetype{num|num}
\exsolution{1|1}
\begin{question}
What are the answers?
\[x_1=\frac{##ANSWER1##}{##ANSWER2##}\]
\end{question} 我可以构建与Moodle兼容的XML,但
我正在检查一些单个选择和多个选择的示例,例如swisscapital.Rmd和switzerland.Rmd。在运行exams2moodle()和检查一些参数时,我发现不正确的答案会受到负值的惩罚(例如,<answer fraction="-25" format="html">在swisscapital.Rmd中)。对于不正确的答案,是否有办法将这个值改为0分?
...
exams2moodle("swisscapital.Rmd", n = 1, name = "swiss_test",
e
我想在我的文件中加载和使用.Rnw:
\exname{foo}
\extype{schoice}
\exsolution{0001}
\usepackage{isotope}
\begin{question}
Foo \isotope[A][Z]{H}\ bar
\begin{answerlist}
\item a
\item b
\item c
\item d
\end{answerlist}
\end{question}
但是,当我将其呈现到Moodle (exams2moodle)中时,\isotope就消失了,只出现了Foo bar。我正在使