summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-02-08 21:58:24 +0000
committerKarl Berry <karl@freefriends.org>2021-02-08 21:58:24 +0000
commitb689b082c823fcce490e8231b4eff18837a5b2d3 (patch)
tree4c946e14963478600e21baf3a92b253dcb415e58 /Master
parent642941ac6911ff4f07f939e330eff1b4bf18e63a (diff)
moodle (8feb21)
git-svn-id: svn://tug.org/texlive/trunk@57683 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/moodle/README.md6
-rw-r--r--Master/texmf-dist/doc/latex/moodle/moodle.pdfbin241634 -> 260933 bytes
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/fig/NoodlE_logo.pngbin0 -> 4119 bytes
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/fig/NoodlE_logo.svg12
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_allornothing-moodle.ref153
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_autopoints-moodle.ref6
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_calculated_python-moodle.ref3
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_multi-moodle.ref3
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_numerical-moodle.ref1
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_shortanswer-moodle.ref1
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_commands-moodle.ref8
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_environments-moodle.ref2
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_escaping_right_braces_in_cloze-moodle.ref3
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_essay-moodle.ref2
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_french-moodle.ref4
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_generalfeedback-moodle.ref7
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_german-moodle.ref34
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_handout-moodle.ref15
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_htmlonly-moodle.ref36
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_macros-moodle.ref2
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_math-moodle.ref47
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_mathenv-moodle.ref5
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_paragraph_breaks-moodle.ref68
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_shortanswer-moodle.ref48
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_special_characters-moodle.ref12
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tags-moodle.ref47
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tikz-moodle.ref5
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tikz_with_svg-moodle.ref5
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tolerance-moodle.ref2
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/test_allornothing.tex74
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/test_essay.tex4
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/test_german.tex51
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/test_htmlonly.tex35
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/test_math.tex44
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/test_paragraph_breaks.tex47
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/test_shortanswer.tex38
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/test_special_characters.tex16
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/test_tags.tex41
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_allornothing-moodle.ref153
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_autopoints-moodle.ref6
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_calculated_lua-moodle.ref9
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_calculated_python-moodle.ref3
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_multi-moodle.ref4
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_numerical-moodle.ref2
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_shortanswer-moodle.ref2
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_commands-moodle.ref8
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_environments-moodle.ref2
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_escaping_right_braces_in_cloze-moodle.ref3
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_essay-moodle.ref2
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_french-moodle.ref4
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_generalfeedback-moodle.ref8
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_german-moodle.ref34
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_handout-moodle.ref15
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_htmlonly-moodle.ref36
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_macros-moodle.ref2
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_math-moodle.ref47
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_mathenv-moodle.ref5
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_paragraph_breaks-moodle.ref68
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_shortanswer-moodle.ref48
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_special_characters-moodle.ref24
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tags-moodle.ref48
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tikz-moodle.ref5
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tikz_with_svg-moodle.ref5
-rw-r--r--Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tolerance-moodle.ref2
-rw-r--r--Master/texmf-dist/source/latex/moodle/makefile2
-rw-r--r--Master/texmf-dist/source/latex/moodle/moodle.dtx827
-rw-r--r--Master/texmf-dist/tex/latex/moodle/moodle.sty460
67 files changed, 2187 insertions, 534 deletions
diff --git a/Master/texmf-dist/doc/latex/moodle/README.md b/Master/texmf-dist/doc/latex/moodle/README.md
index 83eb22b4bf8..30e1b4a9761 100644
--- a/Master/texmf-dist/doc/latex/moodle/README.md
+++ b/Master/texmf-dist/doc/latex/moodle/README.md
@@ -10,7 +10,7 @@ part of all distributions of LaTeX version 2005/12/01 or later.
Original contents (2016): [Anders O.F. Hendrickson](/author/hendrickson) ([contact](mailto:anders.o.f.hendricksonATgmail.com))
-2019-2021: [Matthieu Guerquin-Kern](author/guerquin-kern) ([contact](mailto:guerquin-kernATcrans.org))
+2019-2021: [Matthieu Guerquin-Kern](/author/guerquin-kern) ([contact](mailto:guerquin-kernATcrans.org))
# Contents
@@ -19,6 +19,9 @@ This work, under version number 0.8, consists of the files
[`moodle.ins`](/tex-archive/macros/latex/contrib/moodle/moodle.ins), and the derived documentation
file [`moodle.pdf`](/tex-archive/macros/latex/contrib/moodle/moodle.pdf).
+The derived file `moodle.sty` can be downloaded from [here](https://www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/latex/moodle/moodle.sty?view=co).
+Details on how to generate derived files from the sources are given in Section "Building" at the end of this document.
+
A TDS archive [moodle.tds.zip](http://mirrors.ctan.org/install/macros/latex/contrib/moodle.tds.zip) is
also available to be conveniently expanded in your local texmf directory.
It contains the derived file `moodle.sty` and a set of test files.
@@ -65,3 +68,4 @@ The documentation file `moodle.pdf` can be generated by running twice the comman
```bash
lualatex -shell-escape moodle.dtx
```
+(n.b. the requirements in the previous section)
diff --git a/Master/texmf-dist/doc/latex/moodle/moodle.pdf b/Master/texmf-dist/doc/latex/moodle/moodle.pdf
index 1c047103cd7..47a4c2ecca1 100644
--- a/Master/texmf-dist/doc/latex/moodle/moodle.pdf
+++ b/Master/texmf-dist/doc/latex/moodle/moodle.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/moodle/test/fig/NoodlE_logo.png b/Master/texmf-dist/doc/latex/moodle/test/fig/NoodlE_logo.png
new file mode 100644
index 00000000000..cd4218f0bc6
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moodle/test/fig/NoodlE_logo.png
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/moodle/test/fig/NoodlE_logo.svg b/Master/texmf-dist/doc/latex/moodle/test/fig/NoodlE_logo.svg
new file mode 100644
index 00000000000..73066e6956b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moodle/test/fig/NoodlE_logo.svg
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.1" viewBox="0 0 299.7 99.977" xmlns="http://www.w3.org/2000/svg">
+<g fill="#f98012">
+<path d="m108.79 22.756-3.094-2.117-7.492 12.05c-5.375-1.792-10.59-1.792-11.56-1.792-17.1 0-26.55 10.59-26.55 24.43 0 6.351 2.443 14.98 11.73 19.87l-7.328 11.89 3.095 1.954 7.653-12.21c5.212 1.792 10.1 1.792 11.4 1.792 17.43 0 26.55-10.59 26.55-23.29 0-7.98-3.421-16.45-11.73-20.85zm-33.71 47.23c-3.095-3.746-3.095-9.609-3.095-14.82 0-7.817 0-20.52 14.66-20.52 3.095 0 6.189 0.651 8.794 2.443zm23.13-30.29c2.932 4.072 3.095 9.772 3.095 15.47 0 7.816 0 19.71-14.66 19.71-1.302 0-5.211 0-8.631-2.28z"/>
+<path d="m138.29 78.556c-6.975 0-12.75-2.224-17.3-6.65-4.551-4.424-6.826-10.12-6.826-17.12 0-6.975 2.275-12.67 6.826-17.1 4.549-4.424 10.32-6.65 17.3-6.65s12.77 2.225 17.35 6.65c4.6 4.426 6.899 10.15 6.899 17.1 0 6.975-2.299 12.68-6.899 17.12-4.6 4.426-10.37 6.65-17.35 6.65zm0-36.45c-3.324 0-5.875 1.25-7.674 3.775-1.775 2.525-2.676 5.5-2.676 8.975s0.8256 6.4 2.5 8.774c1.901 2.725 4.526 4.076 7.85 4.076 3.326 0 5.926-1.35 7.85-4.076 1.75-2.4 2.625-5.326 2.625-8.774 0-3.475-0.8256-6.4-2.5-8.774-1.924-2.651-4.576-3.975-7.975-3.975z"/>
+<path d="m199.89 77.326v-4.551c-1.225 1.65-3.326 2.951-6.276 3.951-2.625 0.8996-5.125 1.35-7.5 1.35-6.574 0-11.85-2.25-15.82-6.776-3.975-4.5-5.975-10.1-5.975-16.75 0-6.574 1.951-12.07 5.85-16.5 3.449-3.924 9.1-6.65 15.57-6.65 7.301 0 11.58 2.75 14.15 5.9v-37.3h13.42v77.32zm0-25.75c0-2.451-1.176-4.826-3.5-7.075-2.326-2.25-4.75-3.375-7.2-3.375-3.525 0-6.326 1.451-8.375 4.299-1.799 2.551-2.701 5.676-2.701 9.35 0 3.625 0.9013 6.7 2.701 9.225 2.049 2.951 4.85 4.424 8.375 4.424 2.125 0 4.451-1 6.95-3.025 2.5-2 3.75-4.074 3.75-6.225z"/>
+<path d="m217.49 6e-3h13.8v77.32h-13.8z"/>
+<path d="m299.69 73.836h-2.774c-2.772 15.57-5.324 23-24.29 23h-14.64c-5.212 0-5.435-0.712-5.435-4.07v-27.07h9.872c10.76 0 11.98 3.257 11.98 11.91h2.773v-26.87h-2.773c0 8.649-1.22 11.8-11.98 11.8h-9.872v-24.32c0-3.358 0.2227-4.072 5.435-4.072h14.2c16.97 0 19.85 5.598 21.63 19.74h2.773l-3.105-22.8h-62.11v3.053h2.552c8.539 0 8.762 1.12 8.762 4.783v53.12c0 3.663-0.2216 4.782-8.762 4.782h-2.552v3.155h63.67l4.659-26.15z"/>
+<path d="m58.372 48.433v29.07h-13.77v-27.07c0-5.65-2.301-8.5-6.899-8.5-4.676 0-7 2.826-7 8.5v27.07h-13.78v-28.68c0-5.9 2.051-10.37 6.151-13.4 3.599-2.701 8.5-4.076 14.65-4.076 6.225 0 10.046 1.6771 13.77 4.801 3.5957 3.016 6.9631 7.0008 6.878 12.285z"/>
+</g>
+<path d="m43.666 29.273 13.68-10-0.176-0.6003c-24.67 3.025-35.9 5.174-57.17 17.5l0.2007 0.5493 1.699 0.0263c-0.1497 1.699-0.4243 5.9-0.074 12.25-2.35 6.824-0.051 11.47 2.099 16.52 0.3503-5.25 0.301-11-1.299-16.72-0.3257-6.275-0.0493-10.42 0.1003-12.02l14.1 0.125s-0.1003 4.25 0.4243 8.274c12.6 4.424 25.27-0.0247 32-10.92-1.9-2.125-5.576-4.975-5.576-4.975z" fill="#333"/>
+</svg>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_allornothing-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_allornothing-moodle.ref
new file mode 100644
index 00000000000..c3806dce58f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_allornothing-moodle.ref
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<quiz>
+
+<question type="category">
+ <category>
+ <text>$course$/top/All Or Nothing</text>
+ </category>
+</question>
+
+<question type="multichoiceset">
+ <name format="html">
+ <text><![CDATA[All Or Nothing]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>text </p>]]></text>
+ </questiontext>
+ <defaultgrade>1.0</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <shuffleanswers>1</shuffleanswers>
+ <answernumbering>abc</answernumbering>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>a</p>]]></text>
+ </answer>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>b</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>c</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>d</p>]]></text>
+ </answer>
+</question>
+<question type="multichoiceset">
+ <name format="html">
+ <text><![CDATA[All Or Nothing Wins Conflict 1]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>text </p>]]></text>
+ </questiontext>
+ <defaultgrade>1.0</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <shuffleanswers>1</shuffleanswers>
+ <answernumbering>abc</answernumbering>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>a</p>]]></text>
+ </answer>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>b</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>c</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>d</p>]]></text>
+ </answer>
+</question>
+<question type="multichoiceset">
+ <name format="html">
+ <text><![CDATA[All Or Nothing Wins Conflict 2]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>text </p>]]></text>
+ </questiontext>
+ <defaultgrade>1.0</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <shuffleanswers>1</shuffleanswers>
+ <answernumbering>abc</answernumbering>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>a</p>]]></text>
+ </answer>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>b</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>c</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>d</p>]]></text>
+ </answer>
+</question>
+<question type="multichoiceset">
+ <name format="html">
+ <text><![CDATA[All Or Nothing Wins Conflict 3]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>text </p>]]></text>
+ </questiontext>
+ <defaultgrade>1.0</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <shuffleanswers>1</shuffleanswers>
+ <answernumbering>abc</answernumbering>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>a</p>]]></text>
+ </answer>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>b</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>c</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>d</p>]]></text>
+ </answer>
+</question>
+<question type="multichoiceset">
+ <name format="html">
+ <text><![CDATA[All Or Nothing Wins Conflict 4]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>text </p>]]></text>
+ </questiontext>
+ <defaultgrade>1.0</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <shuffleanswers>1</shuffleanswers>
+ <answernumbering>abc</answernumbering>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>a</p>]]></text>
+ </answer>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>b</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>c</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>d</p>]]></text>
+ </answer>
+</question>
+<question type="cloze">
+ <name format="html">
+ <text><![CDATA[Title]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>text {1:MULTICHOICE_S:=a~%20%b~%-30%c~d}</p>]]></text>
+ </questiontext>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+</question>
+
+</quiz>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_autopoints-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_autopoints-moodle.ref
index e562720d20b..6d75fecd5cc 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_autopoints-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_autopoints-moodle.ref
@@ -13,7 +13,7 @@
<text><![CDATA[All correct]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>100\% is distributed uniformly. </p>]]></text>
+ <text><![CDATA[<p>100% is distributed uniformly. </p>]]></text>
</questiontext>
<defaultgrade>1.0</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
@@ -37,7 +37,7 @@
<text><![CDATA[Auto sanction]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>Without the star, an error shall be issued because correct answers should sum up to 100\%. </p>]]></text>
+ <text><![CDATA[<p>Without the star, an error shall be issued because correct answers should sum up to 100%. </p>]]></text>
</questiontext>
<defaultgrade>1.0</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
@@ -61,7 +61,7 @@
<text><![CDATA[All correct but sum \(\geq 100\)]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>A warning shall be issued because correct answers must sum up to 100\%. </p>]]></text>
+ <text><![CDATA[<p>A warning shall be issued because correct answers must sum up to 100%. </p>]]></text>
</questiontext>
<defaultgrade>1.0</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_calculated_python-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_calculated_python-moodle.ref
index c3f6cb45560..4ba7844f476 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_calculated_python-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_calculated_python-moodle.ref
@@ -15,7 +15,6 @@
<questiontext format="html">
<text><![CDATA[<p>Solve the following tasks!<BR/> \(3 + 2 =\){1:NUMERICAL:=5:0}\(3 - 2 =\){1:NUMERICAL:=1:0}\(3 * 2 =\){1:NUMERICAL:=6:0}</p>]]></text>
</questiontext>
- <defaultgrade>3</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
@@ -30,7 +29,6 @@
<questiontext format="html">
<text><![CDATA[<p>Solve the following tasks!<BR/> \(4 + 2 =\){1:NUMERICAL:=6:0}\(4 - 2 =\){1:NUMERICAL:=2:0}\(4 * 2 =\){1:NUMERICAL:=8:0}\(4 : 2 =\){1:NUMERICAL:=2:0}</p>]]></text>
</questiontext>
- <defaultgrade>4</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
@@ -45,7 +43,6 @@
<questiontext format="html">
<text><![CDATA[<p>Solve the following tasks!<BR/> \(4 + 3 =\){1:NUMERICAL:=7:0}\(4 - 3 =\){1:NUMERICAL:=1:0}\(4 * 3 =\){1:NUMERICAL:=12:0}</p>]]></text>
</questiontext>
- <defaultgrade>3</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_multi-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_multi-moodle.ref
index 41e56f930bd..352db7b5bd6 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_multi-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_multi-moodle.ref
@@ -13,9 +13,8 @@
<text><![CDATA[Cloze]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>Regular, single, no shuffle {1:MULTICHOICE:=chip#yes~%10%<I>chop</I>~%-30%<B>chap</B>#no.}</P><P>Vertical, single, no shuffle {1:MULTICHOICE_V:=chip#yes~%10%chop~chap#no.}</P><P>Horizontal, single, no shuffle {1:MULTICHOICE_H:=chip#yes~%10%chop~chap#no.}</P><P>Regular, single, shuffle {1:MULTICHOICE_S:=chip~chop#yes~chap#no.}</P><P>Vertical, single, shuffle {1:MULTICHOICE_VS:=chip#yes~%10%chop~chap#no.}</P><P>Horizontal, single, shuffle {1:MULTICHOICE_HS:=chip#yes~chop~chap#no.}</P><P>Regular, multiple, no shuffle {1:MULTIRESPONSE:=chip~=chop#yes~chap#no.}</P><P></P><P>Horizontal, multiple, no shuffle {1:MULTIRESPONSE_H:=chip#yes~=chop~chap#no.}</P><P>Regular, multiple, shuffle {1:MULTIRESPONSE_S:=chip~=chop#yes~chap#no.}Horizontal, multiple, shuffle {1:MULTIRESPONSE_HS:=chip#yes~=chop~chap#no.}</P><P></p>]]></text>
+ <text><![CDATA[<p>Regular, single, no shuffle {1:MULTICHOICE:=chip#yes~%10%<I>chop</I>~%-30%<B>chap</B>#no.}<BR/>Vertical, single, no shuffle {1:MULTICHOICE_V:=chip#yes~%10%chop~chap#no.}<BR/>Horizontal, single, no shuffle {1:MULTICHOICE_H:=chip#yes~%10%chop~chap#no.}<BR/>Regular, single, shuffle {1:MULTICHOICE_S:=chip~chop#yes~chap#no.}<BR/>Vertical, single, shuffle {1:MULTICHOICE_VS:=chip#yes~%10%chop~chap#no.}<BR/>Horizontal, single, shuffle {1:MULTICHOICE_HS:=chip#yes~chop~chap#no.}<BR/>Regular, multiple, no shuffle {1:MULTIRESPONSE:=chip~=chop#yes~chap#no.}<BR/><BR/>Horizontal, multiple, no shuffle {1:MULTIRESPONSE_H:=chip#yes~=chop~chap#no.}<BR/>Regular, multiple, shuffle {1:MULTIRESPONSE_S:=chip~=chop#yes~chap#no.}Horizontal, multiple, shuffle {1:MULTIRESPONSE_HS:=chip#yes~=chop~chap#no.}<BR/></p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_numerical-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_numerical-moodle.ref
index 857887aa2ab..c847212b08d 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_numerical-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_numerical-moodle.ref
@@ -15,7 +15,6 @@
<questiontext format="html">
<text><![CDATA[<p>Enter an integer \(n\) such that \(0&lt; n\leq 2\). {1:NUMERICAL:%10%0:0.001#study difference between \(&lt;\) and \(\leq \)~=1:0.01#good!~=2:0.1#OK}</p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_shortanswer-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_shortanswer-moodle.ref
index e15cdf9c6a3..5e92a903e6b 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_shortanswer-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_shortanswer-moodle.ref
@@ -15,7 +15,6 @@
<questiontext format="html">
<text><![CDATA[<p>Who? {1:SHORTANSWER_C:=chip~%10%chop#yes~%-30%chap#no.}what? {1:SHORTANSWER:=chip~%10%chop#yes~%-30%chap#no.}</p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_commands-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_commands-moodle.ref
index 19055488acd..2e556796495 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_commands-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_commands-moodle.ref
@@ -35,10 +35,10 @@
<text><![CDATA[<p><CODE>typewriter</CODE></p>]]></text>
</answer>
<answer fraction="100" format="html">
- <text><![CDATA[<p><SPAN STYLE=&#34;font-variant: small-caps;&#34;>Small Capitals</SPAN></p>]]></text>
+ <text><![CDATA[<p><SPAN STYLE="font-variant: small-caps;">Small Capitals</SPAN></p>]]></text>
</answer>
<answer fraction="0" format="html">
- <text><![CDATA[<p><SPAN STYLE=&#34;text-decoration: underline;&#34;>underlined</SPAN></p>]]></text>
+ <text><![CDATA[<p><SPAN STYLE="text-decoration: underline;">underlined</SPAN></p>]]></text>
</answer>
<answer fraction="0" format="html">
<text><![CDATA[<p>M<SUP>me</SUP></p>]]></text>
@@ -47,10 +47,10 @@
<text><![CDATA[<p>H<SUB>2</SUB>O</p>]]></text>
</answer>
<answer fraction="0" format="html">
- <text><![CDATA[<p><A href=&#34;http://192.0.0.256&#34;>http://192.0.0.256</A></p>]]></text>
+ <text><![CDATA[<p><A href="http://192.0.0.256">http://192.0.0.256</A></p>]]></text>
</answer>
<answer fraction="0" format="html">
- <text><![CDATA[<p><A href=&#34;mailto:name@server.com&#34;>Contact me</A></p>]]></text>
+ <text><![CDATA[<p><A href="mailto:name@server.com">Contact me</A></p>]]></text>
</answer>
</question>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_environments-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_environments-moodle.ref
index 4fa9cf95910..b379287f0de 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_environments-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_environments-moodle.ref
@@ -13,7 +13,7 @@
<text><![CDATA[LaTeX Environments]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p><CENTER><SPAN STYLE=&#34;font-variant: small-caps;&#34;>This is a question</SPAN></CENTER> Select the numbered list </p>]]></text>
+ <text><![CDATA[<p><CENTER><SPAN STYLE="font-variant: small-caps;">This is a question</SPAN></CENTER> Select the numbered list </p>]]></text>
</questiontext>
<defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_escaping_right_braces_in_cloze-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_escaping_right_braces_in_cloze-moodle.ref
index 8903c9ce654..69d3b33c04b 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_escaping_right_braces_in_cloze-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_escaping_right_braces_in_cloze-moodle.ref
@@ -13,9 +13,8 @@
<text><![CDATA[Cloze]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>No escaping here: \(y=a\sqrt {x}/2+{b}\) </P><P>No escaping here: <CODE>text</CODE> \(y=a\sqrt {x}/2+{b}\) {4:MULTICHOICE_V:=\(\lbrace A\rbrace \)~{B\}}</P><P>{No escaping here: } \(y=a\sqrt {x}/2+{b}\) {1:SHORTANSWER:=chip#nip~%10%nop#that must be escaped: \(y=a\sqrt {x\}/2+{b\}\)}</P><P>{No escaping here: } \(y=a\sqrt {x}/2+{b}\) {1:NUMERICAL:=0:0#nip~%10%1:0#that must be escaped: \(y=a\sqrt {x\}/2+{b\}\)}</P><P></p>]]></text>
+ <text><![CDATA[<p>No escaping here: \(y=a\sqrt {x}/2+{b}\) <BR/>No escaping here: <CODE>text</CODE> \(y=a\sqrt {x}/2+{b}\) {4:MULTICHOICE_V:=\(\lbrace A\rbrace \)~{B\}}<BR/>{No escaping here: } \(y=a\sqrt {x}/2+{b}\) {1:SHORTANSWER:=chip#nip~%10%nop#that must be escaped: \(y=a\sqrt {x\}/2+{b\}\)}<BR/>{No escaping here: } \(y=a\sqrt {x}/2+{b}\) {1:NUMERICAL:=0:0#nip~%10%1:0#that must be escaped: \(y=a\sqrt {x\}/2+{b\}\)}<BR/></p>]]></text>
</questiontext>
- <defaultgrade>2</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_essay-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_essay-moodle.ref
index 7b025148644..873fc732879 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_essay-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_essay-moodle.ref
@@ -33,7 +33,7 @@
</ul>
]]></text></graderinfo>
<responsetemplate format="html">
- <text><![CDATA[Type you answer here]]></text>
+ <text><![CDATA[Type your answer here]]></text>
</responsetemplate>
</question>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_french-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_french-moodle.ref
index 7a88aba6bda..6de854506c0 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_french-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_french-moodle.ref
@@ -13,7 +13,7 @@
<text><![CDATA[Test french]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p> <SPAN STYLE=&#34;text-decoration: underline;&#34;>Pangramme</SPAN> con&ccedil;u par Gilles <SPAN STYLE=&#34;font-variant: small-caps;&#34;>Esposito-Far&egrave;se</SPAN>&#8239;:</p>]]></text>
+ <text><![CDATA[<p> <SPAN STYLE="text-decoration: underline;">Pangramme</SPAN> con&ccedil;u par Gilles <SPAN STYLE="font-variant: small-caps;">Esposito-Far&egrave;se</SPAN>&#8239;:</p>]]></text>
</questiontext>
<defaultgrade>1</defaultgrade>
<generalfeedback format="html">
@@ -26,7 +26,7 @@
<answernumbering>abc</answernumbering>
<answer fraction="100" format="html">
<text><![CDATA[<p>D&egrave;s No&euml;l o&ugrave; un z&eacute;phyr ha&iuml; me v&ecirc;t de gla&ccedil;ons w&uuml;rmiens je d&icirc;ne d&rsquo;exquis r&ocirc;tis de b&oelig;uf au kir &agrave; l&rsquo;a&yuml; d&rsquo;&acirc;ge m&ucirc;r & c&aelig;tera&#8239;!</p>]]></text>
- <feedback format="html"><text><![CDATA[<p>cit&eacute; dans &laquo;&#8239;&#8239;<A href=&#34;https://jacques-andre.fr/faqtypo/lessons.pdf&#34;>Petites le&ccedil;ons de typographie</A>&#8239;&#8239;&raquo; de Jacques <SPAN STYLE=&#34;font-variant: small-caps;&#34;>Andr&eacute;</SPAN>.</p>]]></text></feedback>
+ <feedback format="html"><text><![CDATA[<p>cit&eacute; dans &laquo;&#8239;&#8239;<A href="https://jacques-andre.fr/faqtypo/lessons.pdf">Petites le&ccedil;ons de typographie</A>&#8239;&#8239;&raquo; de Jacques <SPAN STYLE="font-variant: small-caps;">Andr&eacute;</SPAN>.</p>]]></text></feedback>
</answer>
<answer fraction="0" format="html">
<text><![CDATA[<p>Portez ce vieux whisky au juge blond qui fume.</p>]]></text>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_generalfeedback-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_generalfeedback-moodle.ref
index 61e9145d1cc..8ed9c288f40 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_generalfeedback-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_generalfeedback-moodle.ref
@@ -103,11 +103,11 @@
<shuffleanswers>1</shuffleanswers>
<subquestion format="html">
<text><![CDATA[<p>&aelig;</p>]]></text>
- <answer><text>oui</text></answer>
+ <answer><text>oui </text></answer>
</subquestion>
<subquestion format="html">
<text><![CDATA[<p>&oelig;</p>]]></text>
- <answer><text>non</text></answer>
+ <answer><text>non </text></answer>
</subquestion>
<subquestion format="html">
<text></text>
@@ -145,9 +145,8 @@
<text><![CDATA[Cloze]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>&Aring;&OElig;{1:MULTICHOICE:=chip~%10%chop#yes~chap#no.}&#8239;&raquo;&Aring;{1:SHORTANSWER:=B#toc~=C#&laquo;&#8239;&#8239;&raquo;~*}&laquo;&#8239;&Aring;{1:NUMERICAL:=1:0~=2:0#&laquo;&#8239;&#8239;&raquo;~3:0}&OElig;{1:MULTICHOICE_V:=chip#yes~%10%chop~chap#no.}</P><P>&OElig;{1:MULTICHOICE_H:=chip#yes~%10%chop~chap#no.}</P><P></p>]]></text>
+ <text><![CDATA[<p>&Aring;&OElig;{1:MULTICHOICE:=chip~%10%chop#yes~chap#no.}&#8239;&raquo;&Aring;{1:SHORTANSWER:=B#toc~=C#&laquo;&#8239;&#8239;&raquo;~*}&laquo;&#8239;&Aring;{1:NUMERICAL:=1:0~=2:0#&laquo;&#8239;&#8239;&raquo;~3:0}&OElig;{1:MULTICHOICE_V:=chip#yes~%10%chop~chap#no.}<BR/>&OElig;{1:MULTICHOICE_H:=chip#yes~%10%chop~chap#no.}<BR/></p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html">
<text><![CDATA[<p>54</p>]]></text>
</generalfeedback>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_german-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_german-moodle.ref
new file mode 100644
index 00000000000..a10c8440972
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_german-moodle.ref
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<quiz>
+
+<question type="category">
+ <category>
+ <text>$course$/top/German Issues</text>
+ </category>
+</question>
+
+<question type="multichoice">
+ <name format="html">
+ <text><![CDATA[Test German]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p> <SPAN STYLE="text-decoration: underline;">Pangramm</SPAN> :</p>]]></text>
+ </questiontext>
+ <defaultgrade>1</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <single>true</single>
+ <shuffleanswers>1</shuffleanswers>
+ <answernumbering>abc</answernumbering>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>&bdquo;Fix, Schwyz!&ldquo;, qu&auml;kt J&uuml;rgen bl&ouml;d vom Pa&szlig;.</p>]]></text>
+ <feedback format="html"><text><![CDATA[<p></p>]]></text></feedback>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>Wie schon Carl-Friedrich Gau&szlig; sagte: &bdquo;Nicht alles &Uuml;ble in &Ouml;sterreich ist &ouml;sterreichischer Herkunft &ndash; aber manches, was als &sbquo;&uuml;bel&lsquo; empfunden wird, k&ouml;nnte durch entsprechende &Auml;nderungen zum Guten ver&auml;ndert werden&ldquo;.</p>]]></text>
+ </answer>
+</question>
+
+</quiz>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_handout-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_handout-moodle.ref
index 47a62893013..65586574f12 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_handout-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_handout-moodle.ref
@@ -263,15 +263,15 @@
<shuffleanswers>1</shuffleanswers>
<subquestion format="html">
<text><![CDATA[<p>A</p>]]></text>
- <answer format="html"><text><![CDATA[<p>1</p>]]></text></answer>
+ <answer format="html"><text><![CDATA[<p>1 </p>]]></text></answer>
</subquestion>
<subquestion format="html">
<text><![CDATA[<p>B</p>]]></text>
- <answer format="html"><text><![CDATA[<p>2</p>]]></text></answer>
+ <answer format="html"><text><![CDATA[<p>2 </p>]]></text></answer>
</subquestion>
<subquestion format="html">
<text><![CDATA[<p>C</p>]]></text>
- <answer format="html"><text><![CDATA[<p>3</p>]]></text></answer>
+ <answer format="html"><text><![CDATA[<p>3 </p>]]></text></answer>
</subquestion>
<subquestion format="html">
<text></text>
@@ -297,15 +297,15 @@
<shuffleanswers>0</shuffleanswers>
<subquestion format="html">
<text><![CDATA[<p>A</p>]]></text>
- <answer><text>1</text></answer>
+ <answer><text>1 </text></answer>
</subquestion>
<subquestion format="html">
<text><![CDATA[<p>B</p>]]></text>
- <answer><text>2</text></answer>
+ <answer><text>2 </text></answer>
</subquestion>
<subquestion format="html">
<text><![CDATA[<p>C</p>]]></text>
- <answer><text>3</text></answer>
+ <answer><text>3 </text></answer>
</subquestion>
<subquestion format="html">
<text></text>
@@ -320,9 +320,8 @@
<text><![CDATA[Cloze]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p></P><P>Question text {1:MULTICHOICE_H:=A#AAA~%10%B#BBB~C#CCC}</P><P>Question text {1:MULTICHOICE_V:=A#AAA~%10%B#BBB~C#CCC}</P><P>Question text {1:MULTICHOICE:=A#AAA~%10%B#BBB~C#CCC}</P><P>Question text {1:MULTICHOICE_HS:=A#AAA~%10%B#BBB~C#CCC}</P><P>Question text {1:MULTICHOICE_VS:=A#AAA~%10%B#BBB~C#CCC}</P><P>Question text {1:MULTICHOICE_S:=A#AAA~%10%B#BBB~C#CCC}</P><P>Question text {1:NUMERICAL:=1:1#1~3:1#3}</P><P>Question text {1:SHORTANSWER:=aaa#1~bbb#3}</P><P></p>]]></text>
+ <text><![CDATA[<p><BR/>Question text {1:MULTICHOICE_H:=A#AAA~%10%B#BBB~C#CCC}<BR/>Question text {1:MULTICHOICE_V:=A#AAA~%10%B#BBB~C#CCC}<BR/>Question text {1:MULTICHOICE:=A#AAA~%10%B#BBB~C#CCC}<BR/>Question text {1:MULTICHOICE_HS:=A#AAA~%10%B#BBB~C#CCC}<BR/>Question text {1:MULTICHOICE_VS:=A#AAA~%10%B#BBB~C#CCC}<BR/>Question text {1:MULTICHOICE_S:=A#AAA~%10%B#BBB~C#CCC}<BR/>Question text {1:NUMERICAL:=1:1#1~3:1#3}<BR/>Question text {1:SHORTANSWER:=aaa#1~bbb#3}<BR/></p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html">
<text><![CDATA[<p>General feedback</p>]]></text>
</generalfeedback>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_htmlonly-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_htmlonly-moodle.ref
new file mode 100644
index 00000000000..d8c4be6be2d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_htmlonly-moodle.ref
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<quiz>
+
+<question type="category">
+ <category>
+ <text>$course$/top/HTML Only</text>
+ </category>
+</question>
+
+<question type="multichoice">
+ <name format="html">
+ <text><![CDATA[HTML code]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>A <a href="www.com">$_`'</a> </p>]]></text>
+ </questiontext>
+ <defaultgrade>1.0</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <single>true</single>
+ <shuffleanswers>1</shuffleanswers>
+ <answernumbering>abc</answernumbering>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p><div style="border: 1px solid green; display: inline-block;">HTML contents</div></p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>C</p>]]></text>
+ </answer>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>D</p>]]></text>
+ </answer>
+</question>
+
+</quiz>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_macros-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_macros-moodle.ref
index a67df4abbc7..ab526086c96 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_macros-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_macros-moodle.ref
@@ -13,7 +13,7 @@
<text><![CDATA[LaTeX Macros]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>The following commands should not be placed in items: <BR/> and </P><P>Find the \(\rm\LaTeX\) logo </p>]]></text>
+ <text><![CDATA[<p>The following commands should not be placed in items: <BR/> and <BR/>Find the \(\rm\LaTeX\) logo </p>]]></text>
</questiontext>
<defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_math-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_math-moodle.ref
new file mode 100644
index 00000000000..162aade867b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_math-moodle.ref
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<quiz>
+
+<question type="category">
+ <category>
+ <text>$course$/top/Math Notations</text>
+ </category>
+</question>
+
+<question type="multichoice">
+ <name format="html">
+ <text><![CDATA[Derivative]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>\[\frac {\partial ^{3} f}{\partial ^{3} x}(x).\] </p>]]></text>
+ </questiontext>
+ <defaultgrade>1.0</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <single>true</single>
+ <shuffleanswers>1</shuffleanswers>
+ <answernumbering>abc</answernumbering>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>\(f&rsquo;(x)\)</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>\(f&rsquo;&rsquo;(x)\)</p>]]></text>
+ </answer>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>\(f&rsquo;&rsquo;&rsquo;(x)\)</p>]]></text>
+ </answer>
+</question>
+<question type="cloze">
+ <name format="html">
+ <text><![CDATA[Other derivatives]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>\[\frac {\partial ^{2} g}{\partial ^{2} t}(t).\] {1:MULTICHOICE_VS:\(g&rsquo;(t)\)~=\(g&rsquo;&rsquo;(t)\)~\(g&rsquo;&rsquo;&rsquo;(t)\)}</p>]]></text>
+ </questiontext>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+</question>
+
+</quiz>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_mathenv-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_mathenv-moodle.ref
index 0f2fc15de0d..b4644105fed 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_mathenv-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_mathenv-moodle.ref
@@ -13,7 +13,7 @@
<text><![CDATA[Multiple Choice]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>\[\begin {array}{c}$1\\2\end {array}\] </P><P>\[\begin {array}{c}$1\\2\end {array}\] </P><P>\(\begin {array}{c}$1\\2\end {array}\) </p>]]></text>
+ <text><![CDATA[<p>\[\begin {array}{c}$1\\2\end {array}\] <BR/>\[\begin {array}{c}$1\\2\end {array}\] <BR/>\(\begin {array}{c}$1\\2\end {array}\) </p>]]></text>
</questiontext>
<defaultgrade>1.0</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
@@ -41,9 +41,8 @@
<text><![CDATA[Cloze]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>\[\begin {array}{c}$1\\2\end {array}\] </P><P>\[\begin {array}{c}$1\\2\end {array}\] </P><P>\(\begin {array}{c}$1\\2\end {array}\) {1:MULTICHOICE_VS:=\($\sqrt {25\}\)~6~=7#\[$\sqrt {25\}\]~%10%8}</p>]]></text>
+ <text><![CDATA[<p>\[\begin {array}{c}$1\\2\end {array}\] <BR/>\[\begin {array}{c}$1\\2\end {array}\] <BR/>\(\begin {array}{c}$1\\2\end {array}\) {1:MULTICHOICE_VS:=\($\sqrt {25\}\)~6~=7#\[$\sqrt {25\}\]~%10%8}</p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_paragraph_breaks-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_paragraph_breaks-moodle.ref
new file mode 100644
index 00000000000..e993109d60d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_paragraph_breaks-moodle.ref
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<quiz>
+
+<question type="category">
+ <category>
+ <text>$course$/top/Paragraph Breaks</text>
+ </category>
+</question>
+
+<question type="multichoice">
+ <name format="html">
+ <text><![CDATA[Multi]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>A </p>]]></text>
+ </questiontext>
+ <defaultgrade>1</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <single>true</single>
+ <shuffleanswers>1</shuffleanswers>
+ <answernumbering>abc</answernumbering>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>B <BR/>C</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>D</p>]]></text>
+ </answer>
+</question>
+<question type="cloze">
+ <name format="html">
+ <text><![CDATA[Close-multi]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>A {1:MULTICHOICE_VS:=B <BR/>C~D}</p>]]></text>
+ </questiontext>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+</question>
+<question type="essay">
+ <name format="html">
+ <text><![CDATA[Essay]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>A </p>]]></text>
+ </questiontext>
+ <defaultgrade>1</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <responserequired>0</responserequired>
+ <responseformat>editor</responseformat>
+ <responsefieldlines>15</responsefieldlines>
+ <attachments>0</attachments>
+ <attachmentsrequired>0</attachmentsrequired>
+ <graderinfo format="html"><text><![CDATA[
+ <ul>
+ <li>B <BR/>C </li>
+ <li>D</li>
+ </ul>
+ ]]></text></graderinfo>
+ <responsetemplate format="html"><text/></responsetemplate>
+</question>
+
+</quiz>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_shortanswer-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_shortanswer-moodle.ref
new file mode 100644
index 00000000000..8fa5c9ebd30
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_shortanswer-moodle.ref
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<quiz>
+
+<question type="category">
+ <category>
+ <text>$course$/top/Example Quiz</text>
+ </category>
+</question>
+
+<question type="shortanswer">
+ <name format="html">
+ <text><![CDATA[Short Answer]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>Enter the string <CODE>&rdquo;40%&rdquo;</CODE>. </p>]]></text>
+ </questiontext>
+ <defaultgrade>1.0</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <usecase>0</usecase>
+ <answer fraction="100" format="plain_text">
+ <text>40%</text>
+ <feedback format="html"><text><![CDATA[<p>correct \((1+\sqrt {5})/2\)</p>]]></text></feedback>
+ </answer>
+ <answer fraction="50" format="plain_text">
+ <text>40</text>
+ <feedback format="html"><text><![CDATA[<p>incomplete \((1+\sqrt {5})/2\)</p>]]></text></feedback>
+ </answer>
+ <answer fraction="50" format="plain_text">
+ <text>%</text>
+ <feedback format="html"><text><![CDATA[<p>incomplete \((1+\sqrt {5})/2\)</p>]]></text></feedback>
+ </answer>
+</question>
+<question type="cloze">
+ <name format="html">
+ <text><![CDATA[Short Answer in Cloze]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>Enter the string <CODE>&rdquo;40%&rdquo;</CODE>. {1:SHORTANSWER:=40%#correct \((1+\sqrt {5\})/2\)~%50%40#incomplete \((1+\sqrt {5\})/2\)~%50%%#incomplete \((1+\sqrt {5\})/2\)}</p>]]></text>
+ </questiontext>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+</question>
+
+</quiz>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_special_characters-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_special_characters-moodle.ref
index 71ad7010c69..89c3ed81d39 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_special_characters-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_special_characters-moodle.ref
@@ -33,10 +33,10 @@
</question>
<question type="multichoice">
<name format="html">
- <text><![CDATA[&Aring; &Agrave; &Acirc; &Atilde; &Eacute; &Egrave; &Euml; &Ecirc; &Icirc; &Iuml; &Ntilde; &Otilde; &Ouml; &Ocirc; &Ugrave; &Uuml; &Ucirc; &Ccedil; &#350; &#354; &#336; &#368; &Yuml; &Abreve; &#276; &Gbreve; &#300; &#334; &Ubreve; &Ccaron; &Dcaron; &Ecaron; &Lcaron; &Ncaron; &Rcaron; &Scaron; &Tcaron; &Zcaron; ]]></text>
+ <text><![CDATA[&Aring; &Agrave; &Acirc; &Atilde; &Eacute; &Egrave; &Euml; &Ecirc; &Icirc; &Iuml; &Ntilde; &Otilde; &Ouml; &Ocirc; &Ugrave; &Uuml; &Ucirc; &Ccedil; &#350; &#354; &#336; &#368; &Yuml; &Aogon; &Eogon; &Iogon; &#490; &Uogon; &Abreve; &#276; &Gbreve; &#300; &#334; &Ubreve; &Ccaron; &Dcaron; &Ecaron; &Lcaron; &Ncaron; &Rcaron; &Scaron; &Tcaron; &Zcaron; ]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>&aring; &agrave; &acirc; &atilde; &eacute; &egrave; &euml; &ecirc; &icirc; &iuml; &ntilde; &otilde; &ouml; &ocirc; &ugrave; &uuml; &ucirc; &ccedil; &#351; &#355; &#337; &#369; &yuml; &abreve; &#277; &gbreve; &#301; &#301; &#335; &ubreve; &ccaron; &dcaron; &ecaron; &lcaron; &ncaron; &rcaron; &scaron; &tcaron; &zcaron; <BR/> &Aring; &Agrave; &Acirc; &Atilde; &Eacute; &Egrave; &Euml; &Ecirc; &Icirc; &Iuml; &Ntilde; &Otilde; &Ouml; &Ocirc; &Ugrave; &Uuml; &Ucirc; &Ccedil; &#350; &#354; &#336; &#368; &Yuml; &Abreve; &#276; &Gbreve; &#300; &#334; &Ubreve; &Ccaron; &Dcaron; &Ecaron; &Lcaron; &Ncaron; &Rcaron; &Scaron; &Tcaron; &Zcaron; <BR/> &oelig; &aelig; &szlig; &OElig; &AElig; &#7838; &Oslash; &Lstrok; &laquo;&#8239; &oslash; &lstrok; &#8239;&raquo; &iquest; &iexcl; </p>]]></text>
+ <text><![CDATA[<p>&aring; &agrave; &acirc; &atilde; &eacute; &egrave; &euml; &ecirc; &icirc; &iuml; &ntilde; &otilde; &ouml; &ocirc; &ugrave; &uuml; &ucirc; &ccedil; &#351; &#355; &#337; &#369; &yuml; &aogon; &eogon; &iogon; &#491; &uogon; &abreve; &#277; &gbreve; &#301; &#301; &#335; &ubreve; &ccaron; &dcaron; &ecaron; &lcaron; &ncaron; &rcaron; &scaron; &tcaron; &zcaron; <BR/> &Aring; &Agrave; &Acirc; &Atilde; &Eacute; &Egrave; &Euml; &Ecirc; &Icirc; &Iuml; &Ntilde; &Otilde; &Ouml; &Ocirc; &Ugrave; &Uuml; &Ucirc; &Ccedil; &#350; &#354; &#336; &#368; &Yuml; &Aogon; &Eogon; &Iogon; &#490; &Uogon; &Abreve; &#276; &Gbreve; &#300; &#334; &Ubreve; &Ccaron; &Dcaron; &Ecaron; &Lcaron; &Ncaron; &Rcaron; &Scaron; &Tcaron; &Zcaron; <BR/> &oelig; &aelig; &szlig; &OElig; &AElig; &#7838; &Oslash; &Lstrok; &laquo;&#8239; &oslash; &lstrok; &#8239;&raquo; &iquest; &iexcl; </p>]]></text>
</questiontext>
<defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
@@ -46,12 +46,12 @@
<shuffleanswers>1</shuffleanswers>
<answernumbering>abc</answernumbering>
<answer fraction="0" format="html">
- <text><![CDATA[<p>&aring; &agrave; &acirc; &atilde; &eacute; &egrave; &euml; &ecirc; &icirc; &iuml; &ntilde; &otilde; &ouml; &ocirc; &ugrave; &uuml; &ucirc; &ccedil; &#351; &#355; &#337; &#369; &yuml; &abreve; &#277; &gbreve; &#301; &#301; &#335; &ubreve; &ccaron; &dcaron; &ecaron; &lcaron; &ncaron; &rcaron; &scaron; &tcaron; &zcaron; </p>]]></text>
- <feedback format="html"><text><![CDATA[<p>&Aring; &Agrave; &Acirc; &Atilde; &Eacute; &Egrave; &Euml; &Ecirc; &Icirc; &Iuml; &Ntilde; &Otilde; &Ouml; &Ocirc; &Ugrave; &Uuml; &Ucirc; &Ccedil; &#350; &#354; &#336; &#368; &Yuml; &Abreve; &#276; &Gbreve; &#300; &#334; &Ubreve; &Ccaron; &Dcaron; &Ecaron; &Lcaron; &Ncaron; &Rcaron; &Scaron; &Tcaron; &Zcaron; </p>]]></text></feedback>
+ <text><![CDATA[<p>&aring; &agrave; &acirc; &atilde; &eacute; &egrave; &euml; &ecirc; &icirc; &iuml; &ntilde; &otilde; &ouml; &ocirc; &ugrave; &uuml; &ucirc; &ccedil; &#351; &#355; &#337; &#369; &yuml; &aogon; &eogon; &iogon; &#491; &uogon; &abreve; &#277; &gbreve; &#301; &#301; &#335; &ubreve; &ccaron; &dcaron; &ecaron; &lcaron; &ncaron; &rcaron; &scaron; &tcaron; &zcaron; </p>]]></text>
+ <feedback format="html"><text><![CDATA[<p>&Aring; &Agrave; &Acirc; &Atilde; &Eacute; &Egrave; &Euml; &Ecirc; &Icirc; &Iuml; &Ntilde; &Otilde; &Ouml; &Ocirc; &Ugrave; &Uuml; &Ucirc; &Ccedil; &#350; &#354; &#336; &#368; &Yuml; &Aogon; &Eogon; &Iogon; &#490; &Uogon; &Abreve; &#276; &Gbreve; &#300; &#334; &Ubreve; &Ccaron; &Dcaron; &Ecaron; &Lcaron; &Ncaron; &Rcaron; &Scaron; &Tcaron; &Zcaron; </p>]]></text></feedback>
</answer>
<answer fraction="100" format="html">
- <text><![CDATA[<p>&Aring; &Agrave; &Acirc; &Atilde; &Eacute; &Egrave; &Euml; &Ecirc; &Icirc; &Iuml; &Ntilde; &Otilde; &Ouml; &Ocirc; &Ugrave; &Uuml; &Ucirc; &Ccedil; &#350; &#354; &#336; &#368; &Yuml; &Abreve; &#276; &Gbreve; &#300; &#334; &Ubreve; &Ccaron; &Dcaron; &Ecaron; &Lcaron; &Ncaron; &Rcaron; &Scaron; &Tcaron; &Zcaron; </p>]]></text>
- <feedback format="html"><text><![CDATA[<p>&aring; &agrave; &acirc; &atilde; &eacute; &egrave; &euml; &ecirc; &icirc; &iuml; &ntilde; &otilde; &ouml; &ocirc; &ugrave; &uuml; &ucirc; &ccedil; &#351; &#355; &#337; &#369; &yuml; &abreve; &#277; &gbreve; &#301; &#301; &#335; &ubreve; &ccaron; &dcaron; &ecaron; &lcaron; &ncaron; &rcaron; &scaron; &tcaron; &zcaron; </p>]]></text></feedback>
+ <text><![CDATA[<p>&Aring; &Agrave; &Acirc; &Atilde; &Eacute; &Egrave; &Euml; &Ecirc; &Icirc; &Iuml; &Ntilde; &Otilde; &Ouml; &Ocirc; &Ugrave; &Uuml; &Ucirc; &Ccedil; &#350; &#354; &#336; &#368; &Yuml; &Aogon; &Eogon; &Iogon; &#490; &Uogon; &Abreve; &#276; &Gbreve; &#300; &#334; &Ubreve; &Ccaron; &Dcaron; &Ecaron; &Lcaron; &Ncaron; &Rcaron; &Scaron; &Tcaron; &Zcaron; </p>]]></text>
+ <feedback format="html"><text><![CDATA[<p>&aring; &agrave; &acirc; &atilde; &eacute; &egrave; &euml; &ecirc; &icirc; &iuml; &ntilde; &otilde; &ouml; &ocirc; &ugrave; &uuml; &ucirc; &ccedil; &#351; &#355; &#337; &#369; &yuml; &aogon; &eogon; &iogon; &#491; &uogon; &abreve; &#277; &gbreve; &#301; &#301; &#335; &ubreve; &ccaron; &dcaron; &ecaron; &lcaron; &ncaron; &rcaron; &scaron; &tcaron; &zcaron; </p>]]></text></feedback>
</answer>
</question>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tags-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tags-moodle.ref
index 6e42286d332..b71a7d33ad6 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tags-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tags-moodle.ref
@@ -32,6 +32,7 @@
</answer>
<tags>
<tag><text><![CDATA[multiéàî]]></text></tag>
+ <tag><text><![CDATA[&Aring;&aelig;&oelig;]]></text></tag>
</tags>
</question>
<question type="shortanswer">
@@ -59,6 +60,8 @@
</answer>
<tags>
<tag><text><![CDATA[quizz-level]]></text></tag>
+ <tag><text><![CDATA[ leading whitespace]]></text></tag>
+ <tag><text><![CDATA[with, comma]]></text></tag>
</tags>
</question>
<question type="numerical">
@@ -101,11 +104,11 @@
<shuffleanswers>1</shuffleanswers>
<subquestion format="html">
<text><![CDATA[<p>&aelig;</p>]]></text>
- <answer><text>oui</text></answer>
+ <answer><text>oui </text></answer>
</subquestion>
<subquestion format="html">
<text><![CDATA[<p>&oelig;</p>]]></text>
- <answer><text>non</text></answer>
+ <answer><text>non </text></answer>
</subquestion>
<subquestion format="html">
<text></text>
@@ -142,14 +145,50 @@
<tag><text><![CDATA[essay]]></text></tag>
</tags>
</question>
+<question type="description">
+ <name format="html">
+ <text><![CDATA[Title]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>Text</p>]]></text>
+ </questiontext>
+ <defaultgrade>1</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <tags>
+ <tag><text><![CDATA[desc]]></text></tag>
+ </tags>
+</question>
+<question type="truefalse">
+ <name format="html">
+ <text><![CDATA[Title]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>&Aring;</p>]]></text>
+ </questiontext>
+ <defaultgrade>1</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>1</penalty>
+ <hidden>0</hidden>
+ <answer fraction="100" format="plain_text">
+ <text>true</text>
+ <feedback format="html"><text><![CDATA[<p> &aelig;yo </p>]]></text></feedback>
+ </answer>
+ <answer fraction="0" format="plain_text">
+ <text>false</text>
+ </answer>
+ <tags>
+ <tag><text><![CDATA[TF]]></text></tag>
+ </tags>
+</question>
<question type="cloze">
<name format="html">
<text><![CDATA[Cloze]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>&Aring;&OElig;{1:MULTICHOICE:=chip~%10%chop#yes~chap#no.}&#8239;&raquo;&Aring;{1:SHORTANSWER:=B#toc~=C#&laquo;&#8239;&#8239;&raquo;~*}&laquo;&#8239;&Aring;{1:NUMERICAL:=1:0~=2:0#&laquo;&#8239;&#8239;&raquo;~3:0}&OElig;{1:MULTICHOICE_V:=chip#yes~%10%chop~chap#no.}</P><P>&OElig;{1:MULTICHOICE_H:=chip#yes~%10%chop~chap#no.}</P><P></p>]]></text>
+ <text><![CDATA[<p>&Aring;&OElig;{1:MULTICHOICE:=chip~%10%chop#yes~chap#no.}&#8239;&raquo;&Aring;{1:SHORTANSWER:=B#toc~=C#&laquo;&#8239;&#8239;&raquo;~*}&laquo;&#8239;&Aring;{1:NUMERICAL:=1:0~=2:0#&laquo;&#8239;&#8239;&raquo;~3:0}&OElig;{1:MULTICHOICE_V:=chip#yes~%10%chop~chap#no.}<BR/>&OElig;{1:MULTICHOICE_H:=chip#yes~%10%chop~chap#no.}<BR/></p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tikz-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tikz-moodle.ref
index bd76f582f93..539c50deb23 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tikz-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tikz-moodle.ref
@@ -195,7 +195,7 @@ cwFEchUwcB1g4DBg0E1gYGh3XQ5UwVQqgMUmALNqEhN3PGWqAAAAAElFTkSuQmCC
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv3aB7AAAAD3RSTlMAESIzRFVmd4iZqrvM
3e5GKvWZAAAAU0lEQVQI12NgQIAICLUTTDJ+BVNsD8AUVwOY0lcAU50QFZfAFCdEypsDRDNu5EsA
UtIG9kCVjKcc64Ac7pDMO+VgNS8cQCTzZzCH/QKY4mhgQAMAKiMPa9oLlkgAAAAASUVORK5CYII=
-">}</P><P><IMG SRC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAVBAMAAACNnGLAAAAAIVBMVEX///8AAAAAAAAAAAAAAAAA
+">}<BR/><IMG SRC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAVBAMAAACNnGLAAAAAIVBMVEX///8AAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAADdcGRXAAAACnRSTlMAESIziJm7zN3u5dSV+AAAACNJREFUCNdjYMAC
RIGYybUKSDIaeIFFyCQVgETarDYHBhwAAGGpBhwPdrFnAAAAAElFTkSuQmCC
"> {1:SHORTANSWER:=3#<IMG SRC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAVBAMAAABiXgn+AAAALVBMVEX///8AAAAAAAAAAAAAAAAA
@@ -207,7 +207,7 @@ TkSuQmCC
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv3aB7AAAAD3RSTlMAESIzRFVmd4iZqrvM
3e5GKvWZAAAAU0lEQVQI12NgQIAICLUTTDJ+BVNsD8AUVwOY0lcAU50QFZfAFCdEypsDRDNu5EsA
UtIG9kCVjKcc64Ac7pDMO+VgNS8cQCTzZzCH/QKY4mhgQAMAKiMPa9oLlkgAAAAASUVORK5CYII=
-">}</P><P><IMG SRC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAVBAMAAACNnGLAAAAAIVBMVEX///8AAAAAAAAAAAAAAAAA
+">}<BR/><IMG SRC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAVBAMAAACNnGLAAAAAIVBMVEX///8AAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAADdcGRXAAAACnRSTlMAESIziJm7zN3u5dSV+AAAACNJREFUCNdjYMAC
RIGYybUKSDIaeIFFyCQVgETarDYHBhwAAGGpBhwPdrFnAAAAAElFTkSuQmCC
"> {1:NUMERICAL:=3:0#<IMG SRC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAVBAMAAABiXgn+AAAALVBMVEX///8AAAAAAAAAAAAAAAAA
@@ -221,7 +221,6 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv3aB7AAAAD3RSTlMAESIzRFVmd4iZqrvM
UtIG9kCVjKcc64Ac7pDMO+VgNS8cQCTzZzCH/QKY4mhgQAMAKiMPa9oLlkgAAAAASUVORK5CYII=
">}</p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tikz_with_svg-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tikz_with_svg-moodle.ref
index aa1e98ab2cc..c3b5d27a81d 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tikz_with_svg-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tikz_with_svg-moodle.ref
@@ -311,7 +311,7 @@ Mi41NDUsLTIuNDkxKSI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCwtMi42KSI+PHRleHQgdHJh
bnNmb3JtPSJtYXRyaXgoMSwwLDAsLTEsMCwyLjg2NCkiIGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFt
aWx5PSJTRlRJMTAwMCIgZm9udC1zaXplPSI5Ljk2MjZweCI+PHRzcGFuIHg9IjAiIHk9IjAiPjQ8
L3RzcGFuPjwvdGV4dD48L2c+PC9nPjwvZz48L2c+PC9zdmc+Cg==
-">}</P><P><IMG SRC="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNi42NCIg
+">}<BR/><IMG SRC="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNi42NCIg
aGVpZ2h0PSIxMy4yOCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgNi42NCAxMy4yOCIgeG1s
OnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyB0
cmFuc2Zvcm09Im1hdHJpeCgxLjMzMzMgMCAwIC0xLjMzMzMgMCAxMy4yOCkiPjxnIHRyYW5zZm9y
@@ -338,7 +338,7 @@ Mi41NDUsLTIuNDkxKSI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCwtMi42KSI+PHRleHQgdHJh
bnNmb3JtPSJtYXRyaXgoMSwwLDAsLTEsMCwyLjg2NCkiIGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFt
aWx5PSJTRlRJMTAwMCIgZm9udC1zaXplPSI5Ljk2MjZweCI+PHRzcGFuIHg9IjAiIHk9IjAiPjQ8
L3RzcGFuPjwvdGV4dD48L2c+PC9nPjwvZz48L2c+PC9zdmc+Cg==
-">}</P><P><IMG SRC="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNi42NCIg
+">}<BR/><IMG SRC="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNi42NCIg
aGVpZ2h0PSIxMy4yOCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgNi42NCAxMy4yOCIgeG1s
OnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyB0
cmFuc2Zvcm09Im1hdHJpeCgxLjMzMzMgMCAwIC0xLjMzMzMgMCAxMy4yOCkiPjxnIHRyYW5zZm9y
@@ -367,7 +367,6 @@ aWx5PSJTRlRJMTAwMCIgZm9udC1zaXplPSI5Ljk2MjZweCI+PHRzcGFuIHg9IjAiIHk9IjAiPjQ8
L3RzcGFuPjwvdGV4dD48L2c+PC9nPjwvZz48L2c+PC9zdmc+Cg==
">}</p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tolerance-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tolerance-moodle.ref
index 5319491210c..0ddfa509de6 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tolerance-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tolerance-moodle.ref
@@ -63,7 +63,6 @@
<questiontext format="html">
<text><![CDATA[<p>Give a number {1:NUMERICAL:=1:4~=0:3~*#nope}Give a number {1:NUMERICAL:=1:4~=0:2~*#nope}</p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
@@ -75,7 +74,6 @@
<questiontext format="html">
<text><![CDATA[<p>Give a number {1:NUMERICAL:=1,45e-3:1,65E-4~=0:0~*#nope}</p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/test_allornothing.tex b/Master/texmf-dist/doc/latex/moodle/test/test_allornothing.tex
new file mode 100644
index 00000000000..67651f03096
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moodle/test/test_allornothing.tex
@@ -0,0 +1,74 @@
+% !TeX encoding = UTF-8
+% !TeX spellcheck = en_US
+% !TEX TS-program = lualatex
+\documentclass{article}
+\usepackage[nostamp]{moodle}
+\ifPDFTeX % FOR LATEX and PDFLATEX
+ \usepackage[utf8]{inputenc} % necessary
+ \usepackage[T1]{fontenc} % necessary
+\else % assuming XELATEX or LUALATEX
+ \usepackage{fontspec}
+\fi
+\begin{document}
+
+\section*{Introduction}
+
+This document is intended to check the support of the \texttt{allornothing}
+option for multiple choice questions.
+
+\begin{quiz}[]{All Or Nothing}
+%\begin{quiz}[allornothing]{All Or Nothing}
+
+\begin{multi}[allornothing]{All Or Nothing}%
+text
+\item* a
+\item[fraction=20] b
+\item[fraction=-30] c
+\item d
+\end{multi}
+
+\begin{multi}[allornothing,multiple]{All Or Nothing Wins Conflict 1}%
+text
+\item* a
+\item* b
+\item c
+\item d
+\end{multi}
+
+\begin{multi}[multiple,allornothing]{All Or Nothing Wins Conflict 2}%
+text
+\item* a
+\item* b
+\item c
+\item d
+\end{multi}
+
+\begin{multi}[allornothing,single=false]{All Or Nothing Wins Conflict 3}%
+text
+\item* a
+\item* b
+\item c
+\item d
+\end{multi}
+
+\begin{multi}[single=false,allornothing]{All Or Nothing Wins Conflict 4}%
+text
+\item* a
+\item* b
+\item c
+\item d
+\end{multi}
+
+\begin{cloze}{Title}
+\begin{multi}[allornothing=false] % <- true results in an error issued
+text
+\item* a
+\item[fraction=20] b
+\item[fraction=-30] c
+\item d
+\end{multi}
+\end{cloze}
+
+\end{quiz}
+
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/moodle/test/test_essay.tex b/Master/texmf-dist/doc/latex/moodle/test/test_essay.tex
index 21524bb5c53..3b047954cbc 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/test_essay.tex
+++ b/Master/texmf-dist/doc/latex/moodle/test/test_essay.tex
@@ -17,8 +17,8 @@ This document is intended to check the support of essay questions.
\begin{quiz}[points=1]{Essay Test}
-\begin{essay}[feedback={feedback for essay},template={Type you answer
-here}]{Title}
+\begin{essay}[feedback={feedback for essay},template={Type your answer
+here},response field lines=14]{Title}
A
\item B
\item C
diff --git a/Master/texmf-dist/doc/latex/moodle/test/test_german.tex b/Master/texmf-dist/doc/latex/moodle/test/test_german.tex
new file mode 100644
index 00000000000..0f2058871b0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moodle/test/test_german.tex
@@ -0,0 +1,51 @@
+% !TeX encoding = UTF-8
+% !TeX spellcheck = en_US
+% !TEX TS-program = lualatex
+\documentclass{article}
+\usepackage[nostamp]{moodle}
+\ifPDFTeX % FOR LATEX and PDFLATEX
+ \usepackage[utf8]{inputenc} % necessary
+ \usepackage[T1]{fontenc} % necessary
+ \usepackage{babel}
+\else % assuming XELATEX or LUALATEX
+ \usepackage{fontspec}
+ \usepackage[ngerman]{babel}
+\fi
+
+\ifPDFTeX
+ \def\myquestiontext{ \underline{Pangramm} :}
+ \def\pangramme{\glqq Fix, Schwyz!\grqq, qu\"akt J\"urgen bl\"od vom Pa\ss.}
+ \def\pangrammeother{Wie schon Carl-Friedrich Gau\ss\ sagte: \glqq Nicht
+ alles \"Uble in \"Osterreich ist \"osterreichischer Herkunft -- aber
+ manches, was als \glq \"ubel\grq\ empfunden wird, k\"onnte durch
+ entsprechende \"Anderungen zum Guten ver\"andert werden\grqq.}
+ \def\myfeedback{}
+\else % assuming XELATEX or LUALATEX
+ \def\myquestiontext{ \underline{Pangramm} :}
+ \def\pangramme{„Fix, Schwyz!“, quäkt Jürgen blöd vom Paß.}
+ \def\pangrammeother{Wie schon Carl-Friedrich Gauß sagte: „Nicht alles Üble in
+ Österreich ist österreichischer Herkunft – aber manches, was als ‚übel‘
+ empfunden wird, könnte durch entsprechende Änderungen zum Guten verändert
+ werden“.}
+ \def\myfeedback{}
+\fi
+\htmlregister{\myquestiontext}
+\htmlregister{\pangramme}
+\htmlregister{\pangrammeother}
+\htmlregister{\myfeedback}
+\begin{document}
+
+\section*{Introduction}
+
+This document is intended to check the support of the \texttt{babel} package
+with option \texttt{ngerman} that causes problems during \texttt{pdfLaTeX}
+compilation, due to the special meaning given to \verb|"|.
+
+\begin{quiz}[points=1]{German Issues}
+\begin{multi}[feedback={}]{Test German}
+\myquestiontext
+\item[feedback={\myfeedback}]* \pangramme
+\item \pangrammeother
+\end{multi}
+\end{quiz}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/moodle/test/test_htmlonly.tex b/Master/texmf-dist/doc/latex/moodle/test/test_htmlonly.tex
new file mode 100644
index 00000000000..ba35d5e8c55
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moodle/test/test_htmlonly.tex
@@ -0,0 +1,35 @@
+% !TeX encoding = UTF-8
+% !TeX spellcheck = en_US
+% !TEX TS-program = lualatex
+\documentclass{article}
+\usepackage[nostamp]{moodle}
+\ifPDFTeX % FOR LATEX and PDFLATEX
+ \usepackage[utf8]{inputenc} % necessary
+ \usepackage[T1]{fontenc} % necessary
+\else % assuming XELATEX or LUALATEX
+ \usepackage{fontspec}
+\fi
+
+\begin{document}
+
+\section*{Introduction}
+
+This document is intended to check the support of the command
+\verb|\htmlonly{...}|.
+
+\begin{quiz}{HTML Only}
+
+\begin{multi}{HTML code}
+A \htmlonly[place holder]{<a href="www.com">$_`'</a>} %%,#,\ breaking
+%compilation
+\item \htmlonly[\fbox{PDF contents}]{<div style="border: 1px solid green;
+display: inline-block;">HTML contents</div>}
+\item C
+\item* D
+\end{multi}
+
+\end{quiz}
+
+\end{document}
+
+
diff --git a/Master/texmf-dist/doc/latex/moodle/test/test_math.tex b/Master/texmf-dist/doc/latex/moodle/test/test_math.tex
new file mode 100644
index 00000000000..54ba1a37833
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moodle/test/test_math.tex
@@ -0,0 +1,44 @@
+% !TeX encoding = UTF-8
+% !TeX spellcheck = en_US
+% !TEX TS-program = lualatex
+\documentclass{article}
+\usepackage[nostamp]{moodle}
+\ifPDFTeX % FOR LATEX and PDFLATEX
+ \usepackage[utf8]{inputenc} % necessary
+ \usepackage[T1]{fontenc} % necessary
+\else % assuming XELATEX or LUALATEX
+ \usepackage{fontspec}
+\fi
+
+\moodleregisternewcommands
+\newcommand{\derivative}[3]{\frac{\partial^{#3} #1}{\partial^{#3} #2}(#2)}
+
+\begin{document}
+
+\section*{Introduction}
+
+This document is intended to check the support of \LaTeX\ math notations.
+
+\begin{quiz}{Math Notations}
+
+\begin{multi}{Derivative}
+\[\derivative{f}{x}{3}.\]
+\item $f'(x)$
+\item $f''(x)$
+\item* $f'''(x)$
+\end{multi}
+
+\begin{cloze}{Other derivatives}
+\begin{multi}[vertical]
+\[\derivative{g}{t}{2}.\]
+\item $g'(t)$
+\item* $g''(t)$
+\item $g'''(t)$
+\end{multi}
+\end{cloze}
+
+\end{quiz}
+
+\end{document}
+
+
diff --git a/Master/texmf-dist/doc/latex/moodle/test/test_paragraph_breaks.tex b/Master/texmf-dist/doc/latex/moodle/test/test_paragraph_breaks.tex
new file mode 100644
index 00000000000..d5f46d01edb
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moodle/test/test_paragraph_breaks.tex
@@ -0,0 +1,47 @@
+% !TeX encoding = UTF-8
+% !TeX spellcheck = en_US
+% !TEX TS-program = lualatex
+\documentclass{article}
+\usepackage[nostamp]{moodle}
+\ifPDFTeX % FOR LATEX and PDFLATEX
+ \usepackage[utf8]{inputenc} % necessary
+ \usepackage[T1]{fontenc} % necessary
+\else % assuming XELATEX or LUALATEX
+ \usepackage{fontspec}
+\fi
+
+\begin{document}
+
+\section*{Introduction}
+
+This document is intended to check the support of paragraph breaks in the items
+of essay and multi questions.
+
+\begin{quiz}[points=1]{Paragraph Breaks}
+\begin{multi}{Multi}
+A
+\item* B
+
+C
+\item D
+\end{multi}
+
+\begin{cloze}{Close-multi}
+\begin{multi}[vertical]
+A
+\item* B
+
+C
+\item D
+\end{multi}
+\end{cloze}
+
+\begin{essay}{Essay}
+A
+\item B
+
+C
+\item D
+\end{essay}
+\end{quiz}
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/moodle/test/test_shortanswer.tex b/Master/texmf-dist/doc/latex/moodle/test/test_shortanswer.tex
new file mode 100644
index 00000000000..152c5060ffc
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moodle/test/test_shortanswer.tex
@@ -0,0 +1,38 @@
+% !TeX encoding = UTF-8
+% !TeX spellcheck = en_US
+% !TEX TS-program = pdflatex
+\documentclass{article}
+\usepackage[nostamp]{moodle}
+\ifPDFTeX % FOR LATEX and PDFLATEX
+ \usepackage[utf8]{inputenc} % necessary
+ \usepackage[T1]{fontenc} % necessary
+\else % assuming XELATEX or LUALATEX
+ \usepackage{fontspec}
+\fi
+\def\myequation{$(1+\sqrt{5})/2$}
+\htmlregister{\myequation}
+\begin{document}
+
+\section*{Introduction}
+
+This document is intended to check the support of shortanswer questions.
+
+\begin{quiz}{Example Quiz}
+
+\begin{shortanswer}{Short Answer}
+Enter the string \texttt{"40\%"}.
+\item[fraction=100,feedback={correct \myequation}] 40\%
+\item[fraction=50,feedback={incomplete \myequation}] 40
+\item[fraction=50,feedback={incomplete \myequation}] \%
+\end{shortanswer}
+\begin{cloze}{Short Answer in Cloze}
+\begin{shortanswer}
+Enter the string \texttt{"40\%"}.
+\item[fraction=100,feedback={correct \myequation}] 40\%
+\item[fraction=50,feedback={incomplete \myequation}] 40
+\item[fraction=50,feedback={incomplete \myequation}] \%
+\end{shortanswer}
+\end{cloze}
+
+\end{quiz}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/moodle/test/test_special_characters.tex b/Master/texmf-dist/doc/latex/moodle/test/test_special_characters.tex
index 557c0642c36..4d0cf4940de 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/test_special_characters.tex
+++ b/Master/texmf-dist/doc/latex/moodle/test/test_special_characters.tex
@@ -19,8 +19,10 @@
\def\UTFotherUC{}
\def\UFTextend{
\newcommand\addtomacro[2]{\expandafter\def\expandafter##1\expandafter{##1##2}}%
- \addtomacro{\UTFdiacriticLC}{ÅŸ Å£ Å‘ ű ÿ ă Ä• ÄŸ Ä­ Å Å­ Ä Ä Ä› ľ ň Å™ Å¡ Å¥ ž }%
- \addtomacro{\UTFdiacriticUC}{Ş Ţ ŠŰ Ÿ Ă Ĕ Ğ Ĭ Ŏ Ŭ Č Ď Ě Ľ Ň Ř Š Ť Ž }%
+ \addtomacro{\UTFdiacriticLC}{ÅŸ Å£ Å‘ ű ÿ Ä… Ä™ į Ç« ų ă Ä• ÄŸ Ä­ Å Å­ Ä Ä Ä› ľ ň Å™ Å¡ Å¥
+ ž }%
+ \addtomacro{\UTFdiacriticUC}{Ş Ţ ŠŰ Ÿ Ą Ę Į Ǫ Ų Ă Ĕ Ğ Ĭ Ŏ Ŭ Č Ď Ě Ľ Ň Ř Š Ť
+ Ž }%
\addtomacro{\UTFligaturesLC}{œ æ ß }%
\addtomacro{\UTFligaturesUC}{Œ Æ ẞ }%
\addtomacro{\UTFotherLC}{« ø ł » ¿ ¡ }%
@@ -31,12 +33,12 @@
\fi
\def\LaTeXdiacriticLC
{\aa\ \`a \^a \~a \'e \`e \"e \^e \^i \"i \~n \~o \"o \^o \`u \"u \^u \c{c}
-\c{s} \c{t} \H{o} \H{u} \"y \u{a} \u{e} \u{g} \u{i} \u{\i} \u{o} \u{u} \v{c}
-\v{d} \v{e} \v{l} \v{n} \v{r} \v{s} \v{t} \v{z} }
+\c{s} \c{t} \H{o} \H{u} \"y \k{a} \k{e} \k{i} \k{o} \k{u} \u{a} \u{e} \u{g}
+\u{i} \u{\i} \u{o} \u{u} \v{c} \v{d} \v{e} \v{l} \v{n} \v{r} \v{s} \v{t} \v{z} }
\def\LaTeXdiacriticUC
{\AA\ \`A \^A \~A \'E \`E \"E \^E \^I \"I \~N \~O \"O \^O \`U \"U \^U \c{C}
-\c{S} \c{T} \H{O} \H{U} \"Y \u{A} \u{E} \u{G} \u{I} \u{O} \u{U} \v{C} \v{D}
-\v{E} \v{L} \v{N} \v{R} \v{S} \v{T} \v{Z} }
+\c{S} \c{T} \H{O} \H{U} \"Y \k{A} \k{E} \k{I} \k{O} \k{U} \u{A} \u{E} \u{G}
+\u{I} \u{O} \u{U} \v{C} \v{D} \v{E} \v{L} \v{N} \v{R} \v{S} \v{T} \v{Z} }
\def\LaTeXligaturesLC{\oe\ \ae\ \ss\ }
\def\LaTeXligaturesUC{\OE\ \AE\ \SS\ }
\def\LaTeXotherLC{\guillemotleft\ \o\ \l\ \guillemotright\ \textquestiondown\ %
@@ -61,7 +63,7 @@
\section*{Introduction}
This document is intended to check the support of diacritical marks (accents)
-and ligatures found in different languages written with the latin alphabet.
+and ligatures found in different languages written with the Latin alphabet.
For most of them, two ways of encoding are tested: UTF8 et \LaTeX{} syntax.
diff --git a/Master/texmf-dist/doc/latex/moodle/test/test_tags.tex b/Master/texmf-dist/doc/latex/moodle/test/test_tags.tex
index 870827431e1..5cb9e144c98 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/test_tags.tex
+++ b/Master/texmf-dist/doc/latex/moodle/test/test_tags.tex
@@ -9,41 +9,36 @@
\else % assuming XELATEX or LUALATEX
\usepackage{fontspec}
\fi
-\usepackage[french]{babel} % for french quotes
\begin{document}
\section*{Introduction}
-This document is intended to check the support of tags (i.e. keywords). The
-definition of multiple tags per question is currently unsupported.
+This document is intended to check the support of tags (i.e. keywords).
-\begin{quiz}[points=1,tags={quizz-level}]{Moodle Tags}
-
- \begin{multi}[tags={multiéàî}]{Title}
- %\og abc\fg%\ae%\oe%
+\begin{quiz}[points=1,tags={quizz-level,{ leading whitespace},{with,
+comma}}]{Moodle Tags}
+
+ \begin{multi}[tags={multiéàî,\AA\ae\oe}]{Title}%
\AA
\item[feedback={tic}] \ae
\item[feedback={tac}]* \oe
\end{multi}
\begin{shortanswer}[]{Title}
- % %\og abc\fg%\ae%\oe
\AA
\item[feedback={toc}] B
- \item[feedback={\og\fg}] C
+ \item[feedback={\guillemotleft\guillemotright}] C
\item[fraction=0] *
\end{shortanswer}
\begin{numerical}[tags={}]{Title}
- % %\og abc\fg%\ae%\oe
\AA
\item[feedback={toc}] 1
- \item[feedback={\og\fg}] 2
+ \item[feedback={\guillemotleft\guillemotright}] 2
\item[fraction=0] 3
\end{numerical}
\begin{matching}[tags={m\aa tch\"ing}]{Title}
- %\og abc\fg%\ae%\oe%
\AA
\item \ae \answer oui
\item \oe \answer non
@@ -51,12 +46,22 @@ definition of multiple tags per question is currently unsupported.
\end{matching}
\begin{essay}[tags={essay}]{Title}
- %\og abc\fg%\ae%\oe%
\AA
\item \ae yo
\item \oe
\end{essay}
+ \begin{description}[tags={desc}]{Title}%
+ Text
+ \end{description}
+
+
+ \begin{truefalse}[tags={TF}]{Title}
+ \AA
+ \item* \ae yo
+ \item \oe
+ \end{truefalse}
+
\begin{cloze}[tags={cloze}]{Cloze}
\AA
\begin{multi}[shuffle=false]
@@ -65,18 +70,18 @@ definition of multiple tags per question is currently unsupported.
\item[feedback={yes},fraction=10] chop
\item[feedback={no.}] chap
\end{multi}
- \fg
+ \guillemotright
\begin{shortanswer}
\AA
\item[feedback={toc}] B
- \item[feedback={\og\fg}] C
+ \item[feedback={\guillemotleft\guillemotright}] C
\item[fraction=0] *
\end{shortanswer}
- \og
+ \guillemotleft
\begin{numerical}
\AA
\item[] 1
- \item[feedback={\og\fg}] 2
+ \item[feedback={\guillemotleft\guillemotright}] 2
\item[fraction=0] 3
\end{numerical}
\begin{multi}[shuffle=false,vertical]
@@ -94,7 +99,7 @@ definition of multiple tags per question is currently unsupported.
\end{multi}
\end{cloze}
-
+
\end{quiz}
\end{document}
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_allornothing-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_allornothing-moodle.ref
new file mode 100644
index 00000000000..ff497563438
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_allornothing-moodle.ref
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<quiz>
+
+<question type="category">
+ <category>
+ <text>$course$/top/All Or Nothing</text>
+ </category>
+</question>
+
+<question type="multichoiceset">
+ <name format="html">
+ <text><![CDATA[All Or Nothing]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>text </p>]]></text>
+ </questiontext>
+ <defaultgrade>1.0</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <shuffleanswers>1</shuffleanswers>
+ <answernumbering>abc</answernumbering>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>a</p>]]></text>
+ </answer>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>b</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>c</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>d</p>]]></text>
+ </answer>
+</question>
+<question type="multichoiceset">
+ <name format="html">
+ <text><![CDATA[All Or Nothing Wins Conflict 1]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>text </p>]]></text>
+ </questiontext>
+ <defaultgrade>1.0</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <shuffleanswers>1</shuffleanswers>
+ <answernumbering>abc</answernumbering>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>a</p>]]></text>
+ </answer>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>b</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>c</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>d</p>]]></text>
+ </answer>
+</question>
+<question type="multichoiceset">
+ <name format="html">
+ <text><![CDATA[All Or Nothing Wins Conflict 2]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>text </p>]]></text>
+ </questiontext>
+ <defaultgrade>1.0</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <shuffleanswers>1</shuffleanswers>
+ <answernumbering>abc</answernumbering>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>a</p>]]></text>
+ </answer>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>b</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>c</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>d</p>]]></text>
+ </answer>
+</question>
+<question type="multichoiceset">
+ <name format="html">
+ <text><![CDATA[All Or Nothing Wins Conflict 3]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>text </p>]]></text>
+ </questiontext>
+ <defaultgrade>1.0</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <shuffleanswers>1</shuffleanswers>
+ <answernumbering>abc</answernumbering>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>a</p>]]></text>
+ </answer>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>b</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>c</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>d</p>]]></text>
+ </answer>
+</question>
+<question type="multichoiceset">
+ <name format="html">
+ <text><![CDATA[All Or Nothing Wins Conflict 4]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>text </p>]]></text>
+ </questiontext>
+ <defaultgrade>1.0</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <shuffleanswers>1</shuffleanswers>
+ <answernumbering>abc</answernumbering>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>a</p>]]></text>
+ </answer>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>b</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>c</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>d</p>]]></text>
+ </answer>
+</question>
+<question type="cloze">
+ <name format="html">
+ <text><![CDATA[Title]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>text {1:MULTICHOICE_S:=a~%20%b~%-30%c~d}</p>]]></text>
+ </questiontext>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+</question>
+
+</quiz>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_autopoints-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_autopoints-moodle.ref
index 5d8f4bd6f74..c31ee8ad13c 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_autopoints-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_autopoints-moodle.ref
@@ -13,7 +13,7 @@
<text><![CDATA[All correct]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>100\% is distributed uniformly. </p>]]></text>
+ <text><![CDATA[<p>100% is distributed uniformly. </p>]]></text>
</questiontext>
<defaultgrade>1.0</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
@@ -37,7 +37,7 @@
<text><![CDATA[Auto sanction]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>Without the star, an error shall be issued because correct answers should sum up to 100\%. </p>]]></text>
+ <text><![CDATA[<p>Without the star, an error shall be issued because correct answers should sum up to 100%. </p>]]></text>
</questiontext>
<defaultgrade>1.0</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
@@ -61,7 +61,7 @@
<text><![CDATA[All correct but sum \(\geq 100\)]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>A warning shall be issued because correct answers must sum up to 100\%. </p>]]></text>
+ <text><![CDATA[<p>A warning shall be issued because correct answers must sum up to 100%. </p>]]></text>
</questiontext>
<defaultgrade>1.0</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_calculated_lua-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_calculated_lua-moodle.ref
index ac0d1123b74..4cb53c521f5 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_calculated_lua-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_calculated_lua-moodle.ref
@@ -13,9 +13,8 @@
<text><![CDATA[Arithmetic Quiz (3, 2)]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>Solve the following tasks!<BR/> \(3 + 2 =\){1:NUMERICAL:=5:0}\(3 - 2 =\){1:NUMERICAL:=1:0}\(3 * 2 =\){1:NUMERICAL:=6:0}</p>]]></text>
+ <text><![CDATA[<p>Solve the following tasks!<BR/> \(3 + 2 = \){1:NUMERICAL:=5:0}\(3 - 2 = \){1:NUMERICAL:=1:0}\(3 * 2 = \){1:NUMERICAL:=6:0}</p>]]></text>
</questiontext>
- <defaultgrade>3</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
@@ -28,9 +27,8 @@
<text><![CDATA[Arithmetic Quiz (4, 2)]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>Solve the following tasks!<BR/> \(4 + 2 =\){1:NUMERICAL:=6:0}\(4 - 2 =\){1:NUMERICAL:=2:0}\(4 * 2 =\){1:NUMERICAL:=8:0}\(4 : 2 =\){1:NUMERICAL:=2:0}</p>]]></text>
+ <text><![CDATA[<p>Solve the following tasks!<BR/> \(4 + 2 = \){1:NUMERICAL:=6:0}\(4 - 2 = \){1:NUMERICAL:=2:0}\(4 * 2 = \){1:NUMERICAL:=8:0}\(4 : 2 = \){1:NUMERICAL:=2:0}</p>]]></text>
</questiontext>
- <defaultgrade>4</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
@@ -43,9 +41,8 @@
<text><![CDATA[Arithmetic Quiz (4, 3)]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>Solve the following tasks!<BR/> \(4 + 3 =\){1:NUMERICAL:=7:0}\(4 - 3 =\){1:NUMERICAL:=1:0}\(4 * 3 =\){1:NUMERICAL:=12:0}</p>]]></text>
+ <text><![CDATA[<p>Solve the following tasks!<BR/> \(4 + 3 = \){1:NUMERICAL:=7:0}\(4 - 3 = \){1:NUMERICAL:=1:0}\(4 * 3 = \){1:NUMERICAL:=12:0}</p>]]></text>
</questiontext>
- <defaultgrade>3</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_calculated_python-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_calculated_python-moodle.ref
index ac0d1123b74..ac6dcaae343 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_calculated_python-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_calculated_python-moodle.ref
@@ -15,7 +15,6 @@
<questiontext format="html">
<text><![CDATA[<p>Solve the following tasks!<BR/> \(3 + 2 =\){1:NUMERICAL:=5:0}\(3 - 2 =\){1:NUMERICAL:=1:0}\(3 * 2 =\){1:NUMERICAL:=6:0}</p>]]></text>
</questiontext>
- <defaultgrade>3</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
@@ -30,7 +29,6 @@
<questiontext format="html">
<text><![CDATA[<p>Solve the following tasks!<BR/> \(4 + 2 =\){1:NUMERICAL:=6:0}\(4 - 2 =\){1:NUMERICAL:=2:0}\(4 * 2 =\){1:NUMERICAL:=8:0}\(4 : 2 =\){1:NUMERICAL:=2:0}</p>]]></text>
</questiontext>
- <defaultgrade>4</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
@@ -45,7 +43,6 @@
<questiontext format="html">
<text><![CDATA[<p>Solve the following tasks!<BR/> \(4 + 3 =\){1:NUMERICAL:=7:0}\(4 - 3 =\){1:NUMERICAL:=1:0}\(4 * 3 =\){1:NUMERICAL:=12:0}</p>]]></text>
</questiontext>
- <defaultgrade>3</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_multi-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_multi-moodle.ref
index 3cfe0c1f3f7..9ef6a1fdabb 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_multi-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_multi-moodle.ref
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+
<quiz>
<question type="category">
@@ -12,9 +13,8 @@
<text><![CDATA[Cloze]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>Regular, single, no shuffle {1:MULTICHOICE:=chip#yes~%10%<I>chop</I>~%-30%<B>chap</B>#no.}</P><P>Vertical, single, no shuffle {1:MULTICHOICE_V:=chip#yes~%10%chop~chap#no.}</P><P>Horizontal, single, no shuffle {1:MULTICHOICE_H:=chip#yes~%10%chop~chap#no.}</P><P>Regular, single, shuffle {1:MULTICHOICE_S:=chip~chop#yes~chap#no.}</P><P>Vertical, single, shuffle {1:MULTICHOICE_VS:=chip#yes~%10%chop~chap#no.}</P><P>Horizontal, single, shuffle {1:MULTICHOICE_HS:=chip#yes~chop~chap#no.}</P><P>Regular, multiple, no shuffle {1:MULTIRESPONSE:=chip~=chop#yes~chap#no.}</P><P></P><P>Horizontal, multiple, no shuffle {1:MULTIRESPONSE_H:=chip#yes~=chop~chap#no.}</P><P>Regular, multiple, shuffle {1:MULTIRESPONSE_S:=chip~=chop#yes~chap#no.}Horizontal, multiple, shuffle {1:MULTIRESPONSE_HS:=chip#yes~=chop~chap#no.}</P><P></p>]]></text>
+ <text><![CDATA[<p>Regular, single, no shuffle {1:MULTICHOICE:=chip#yes~%10%<I>chop</I>~%-30%<B>chap</B>#no.}<BR/>Vertical, single, no shuffle {1:MULTICHOICE_V:=chip#yes~%10%chop~chap#no.}<BR/>Horizontal, single, no shuffle {1:MULTICHOICE_H:=chip#yes~%10%chop~chap#no.}<BR/>Regular, single, shuffle {1:MULTICHOICE_S:=chip~chop#yes~chap#no.}<BR/>Vertical, single, shuffle {1:MULTICHOICE_VS:=chip#yes~%10%chop~chap#no.}<BR/>Horizontal, single, shuffle {1:MULTICHOICE_HS:=chip#yes~chop~chap#no.}<BR/>Regular, multiple, no shuffle {1:MULTIRESPONSE:=chip~=chop#yes~chap#no.}<BR/><BR/>Horizontal, multiple, no shuffle {1:MULTIRESPONSE_H:=chip#yes~=chop~chap#no.}<BR/>Regular, multiple, shuffle {1:MULTIRESPONSE_S:=chip~=chop#yes~chap#no.}Horizontal, multiple, shuffle {1:MULTIRESPONSE_HS:=chip#yes~=chop~chap#no.}<BR/></p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_numerical-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_numerical-moodle.ref
index 7e05e9ef63e..d0a7eb67452 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_numerical-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_numerical-moodle.ref
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+
<quiz>
<question type="category">
@@ -14,7 +15,6 @@
<questiontext format="html">
<text><![CDATA[<p>Enter an integer \(n\) such that \(0&lt; n\leq 2\). {1:NUMERICAL:%10%0:0.001#study difference between \(&lt;\) and \(\leq \)~=1:0.01#good!~=2:0.1#OK}</p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_shortanswer-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_shortanswer-moodle.ref
index 97fd0bf6f63..1e3f3485f39 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_shortanswer-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_shortanswer-moodle.ref
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+
<quiz>
<question type="category">
@@ -14,7 +15,6 @@
<questiontext format="html">
<text><![CDATA[<p>Who? {1:SHORTANSWER_C:=chip~%10%chop#yes~%-30%chap#no.}what? {1:SHORTANSWER:=chip~%10%chop#yes~%-30%chap#no.}</p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_commands-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_commands-moodle.ref
index 3183131dfe7..a1d30f5d952 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_commands-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_commands-moodle.ref
@@ -35,10 +35,10 @@
<text><![CDATA[<p><CODE>typewriter</CODE></p>]]></text>
</answer>
<answer fraction="100" format="html">
- <text><![CDATA[<p><SPAN STYLE=&#34;font-variant: small-caps;&#34;>Small Capitals</SPAN></p>]]></text>
+ <text><![CDATA[<p><SPAN STYLE="font-variant: small-caps;">Small Capitals</SPAN></p>]]></text>
</answer>
<answer fraction="0" format="html">
- <text><![CDATA[<p><SPAN STYLE=&#34;text-decoration: underline;&#34;>underlined</SPAN></p>]]></text>
+ <text><![CDATA[<p><SPAN STYLE="text-decoration: underline;">underlined</SPAN></p>]]></text>
</answer>
<answer fraction="0" format="html">
<text><![CDATA[<p>M<SUP>me</SUP></p>]]></text>
@@ -47,10 +47,10 @@
<text><![CDATA[<p>H<SUB>2</SUB>O</p>]]></text>
</answer>
<answer fraction="0" format="html">
- <text><![CDATA[<p><A href=&#34;http://192.0.0.256&#34;>http://192.0.0.256</A></p>]]></text>
+ <text><![CDATA[<p><A href="http://192.0.0.256">http://192.0.0.256</A></p>]]></text>
</answer>
<answer fraction="0" format="html">
- <text><![CDATA[<p><A href=&#34;mailto:name@server.com&#34;>Contact me</A></p>]]></text>
+ <text><![CDATA[<p><A href="mailto:name@server.com">Contact me</A></p>]]></text>
</answer>
</question>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_environments-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_environments-moodle.ref
index 5eee6a48e41..cb18639d2cd 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_environments-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_environments-moodle.ref
@@ -13,7 +13,7 @@
<text><![CDATA[LaTeX Environments]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p><CENTER><SPAN STYLE=&#34;font-variant: small-caps;&#34;>This is a question</SPAN></CENTER> Select the numbered list </p>]]></text>
+ <text><![CDATA[<p><CENTER><SPAN STYLE="font-variant: small-caps;">This is a question</SPAN></CENTER> Select the numbered list </p>]]></text>
</questiontext>
<defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_escaping_right_braces_in_cloze-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_escaping_right_braces_in_cloze-moodle.ref
index 2d6f9d99d6a..5fde8567fd1 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_escaping_right_braces_in_cloze-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_escaping_right_braces_in_cloze-moodle.ref
@@ -13,9 +13,8 @@
<text><![CDATA[Cloze]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>No escaping here: \(y=a\sqrt {x}/2+{b}\) </P><P>No escaping here: <CODE>text</CODE> \(y=a\sqrt {x}/2+{b}\) {4:MULTICHOICE_V:=\(\lbrace A\rbrace \)~{B\}}</P><P>{No escaping here: } \(y=a\sqrt {x}/2+{b}\) {1:SHORTANSWER:=chip#nip~%10%nop#that must be escaped: \(y=a\sqrt {x\}/2+{b\}\)}</P><P>{No escaping here: } \(y=a\sqrt {x}/2+{b}\) {1:NUMERICAL:=0:0#nip~%10%1:0#that must be escaped: \(y=a\sqrt {x\}/2+{b\}\)}</P><P></p>]]></text>
+ <text><![CDATA[<p>No escaping here: \(y=a\sqrt {x}/2+{b}\) <BR/>No escaping here: <CODE>text</CODE> \(y=a\sqrt {x}/2+{b}\) {4:MULTICHOICE_V:=\(\lbrace A\rbrace \)~{B\}}<BR/>{No escaping here: } \(y=a\sqrt {x}/2+{b}\) {1:SHORTANSWER:=chip#nip~%10%nop#that must be escaped: \(y=a\sqrt {x\}/2+{b\}\)}<BR/>{No escaping here: } \(y=a\sqrt {x}/2+{b}\) {1:NUMERICAL:=0:0#nip~%10%1:0#that must be escaped: \(y=a\sqrt {x\}/2+{b\}\)}<BR/></p>]]></text>
</questiontext>
- <defaultgrade>2</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_essay-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_essay-moodle.ref
index 2caadf5297f..369e0b66387 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_essay-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_essay-moodle.ref
@@ -33,7 +33,7 @@
</ul>
]]></text></graderinfo>
<responsetemplate format="html">
- <text><![CDATA[Type you answer here]]></text>
+ <text><![CDATA[Type your answer here]]></text>
</responsetemplate>
</question>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_french-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_french-moodle.ref
index 61895de7164..4a92a0aa6ec 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_french-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_french-moodle.ref
@@ -13,7 +13,7 @@
<text><![CDATA[Test french]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p> <SPAN STYLE=&#34;text-decoration: underline;&#34;>Pangramme</SPAN> conçu par Gilles <SPAN STYLE=&#34;font-variant: small-caps;&#34;>Esposito-Farèse</SPAN>:</p>]]></text>
+ <text><![CDATA[<p> <SPAN STYLE="text-decoration: underline;">Pangramme</SPAN> conçu par Gilles <SPAN STYLE="font-variant: small-caps;">Esposito-Farèse</SPAN>:</p>]]></text>
</questiontext>
<defaultgrade>1</defaultgrade>
<generalfeedback format="html">
@@ -26,7 +26,7 @@
<answernumbering>abc</answernumbering>
<answer fraction="100" format="html">
<text><![CDATA[<p>Dès Noël où un zéphyr haï me vêt de glaçons würmiens je dîne d’exquis rôtis de bœuf au kir à l’aÿ d’âge mûr & cætera&#8239;!</p>]]></text>
- <feedback format="html"><text><![CDATA[<p>cité dans &laquo;&#8239;<A href=&#34;https://jacques-andre.fr/faqtypo/lessons.pdf&#34;>Petites leçons de typographie</A>&#8239;&raquo; de Jacques <SPAN STYLE=&#34;font-variant: small-caps;&#34;>André</SPAN>.</p>]]></text></feedback>
+ <feedback format="html"><text><![CDATA[<p>cité dans &laquo;&#8239;<A href="https://jacques-andre.fr/faqtypo/lessons.pdf">Petites leçons de typographie</A>&#8239;&raquo; de Jacques <SPAN STYLE="font-variant: small-caps;">André</SPAN>.</p>]]></text></feedback>
</answer>
<answer fraction="0" format="html">
<text><![CDATA[<p>Portez ce vieux whisky au juge blond qui fume.</p>]]></text>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_generalfeedback-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_generalfeedback-moodle.ref
index b4ded056bc5..49bbe689bf6 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_generalfeedback-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_generalfeedback-moodle.ref
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+
<quiz>
<question type="category">
@@ -102,11 +103,11 @@
<shuffleanswers>1</shuffleanswers>
<subquestion format="html">
<text><![CDATA[<p>&aelig;</p>]]></text>
- <answer><text>oui</text></answer>
+ <answer><text>oui </text></answer>
</subquestion>
<subquestion format="html">
<text><![CDATA[<p>&oelig;</p>]]></text>
- <answer><text>non</text></answer>
+ <answer><text>non </text></answer>
</subquestion>
<subquestion format="html">
<text></text>
@@ -144,9 +145,8 @@
<text><![CDATA[Cloze]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>&Aring;&OElig;{1:MULTICHOICE:=chip~%10%chop#yes~chap#no.}&#8239;&raquo;&Aring;{1:SHORTANSWER:=B#toc~=C#&laquo;&#8239;&#8239;&raquo;~*}&laquo;&#8239;&Aring;{1:NUMERICAL:=1:0~=2:0#&laquo;&#8239;&#8239;&raquo;~3:0}&OElig;{1:MULTICHOICE_V:=chip#yes~%10%chop~chap#no.}</P><P>&OElig;{1:MULTICHOICE_H:=chip#yes~%10%chop~chap#no.}</P><P></p>]]></text>
+ <text><![CDATA[<p>&Aring;&OElig;{1:MULTICHOICE:=chip~%10%chop#yes~chap#no.}&#8239;&raquo;&Aring;{1:SHORTANSWER:=B#toc~=C#&laquo;&#8239;&#8239;&raquo;~*}&laquo;&#8239;&Aring;{1:NUMERICAL:=1:0~=2:0#&laquo;&#8239;&#8239;&raquo;~3:0}&OElig;{1:MULTICHOICE_V:=chip#yes~%10%chop~chap#no.}<BR/>&OElig;{1:MULTICHOICE_H:=chip#yes~%10%chop~chap#no.}<BR/></p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html">
<text><![CDATA[<p>54</p>]]></text>
</generalfeedback>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_german-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_german-moodle.ref
new file mode 100644
index 00000000000..c43f9dd2847
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_german-moodle.ref
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<quiz>
+
+<question type="category">
+ <category>
+ <text>$course$/top/German Issues</text>
+ </category>
+</question>
+
+<question type="multichoice">
+ <name format="html">
+ <text><![CDATA[Test German]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p> <SPAN STYLE="text-decoration: underline;">Pangramm</SPAN> :</p>]]></text>
+ </questiontext>
+ <defaultgrade>1</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <single>true</single>
+ <shuffleanswers>1</shuffleanswers>
+ <answernumbering>abc</answernumbering>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>„Fix, Schwyz!“, quäkt Jürgen blöd vom Paß.</p>]]></text>
+ <feedback format="html"><text><![CDATA[<p></p>]]></text></feedback>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>Wie schon Carl-Friedrich Gauß sagte: „Nicht alles Üble in Österreich ist österreichischer Herkunft – aber manches, was als ‚übel‘ empfunden wird, könnte durch entsprechende Änderungen zum Guten verändert werden“.</p>]]></text>
+ </answer>
+</question>
+
+</quiz>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_handout-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_handout-moodle.ref
index f6bf07339ce..d9a6a1fd097 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_handout-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_handout-moodle.ref
@@ -263,15 +263,15 @@
<shuffleanswers>1</shuffleanswers>
<subquestion format="html">
<text><![CDATA[<p>A</p>]]></text>
- <answer format="html"><text><![CDATA[<p>1</p>]]></text></answer>
+ <answer format="html"><text><![CDATA[<p>1 </p>]]></text></answer>
</subquestion>
<subquestion format="html">
<text><![CDATA[<p>B</p>]]></text>
- <answer format="html"><text><![CDATA[<p>2</p>]]></text></answer>
+ <answer format="html"><text><![CDATA[<p>2 </p>]]></text></answer>
</subquestion>
<subquestion format="html">
<text><![CDATA[<p>C</p>]]></text>
- <answer format="html"><text><![CDATA[<p>3</p>]]></text></answer>
+ <answer format="html"><text><![CDATA[<p>3 </p>]]></text></answer>
</subquestion>
<subquestion format="html">
<text></text>
@@ -297,15 +297,15 @@
<shuffleanswers>0</shuffleanswers>
<subquestion format="html">
<text><![CDATA[<p>A</p>]]></text>
- <answer><text>1</text></answer>
+ <answer><text>1 </text></answer>
</subquestion>
<subquestion format="html">
<text><![CDATA[<p>B</p>]]></text>
- <answer><text>2</text></answer>
+ <answer><text>2 </text></answer>
</subquestion>
<subquestion format="html">
<text><![CDATA[<p>C</p>]]></text>
- <answer><text>3</text></answer>
+ <answer><text>3 </text></answer>
</subquestion>
<subquestion format="html">
<text></text>
@@ -320,9 +320,8 @@
<text><![CDATA[Cloze]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p></P><P>Question text {1:MULTICHOICE_H:=A#AAA~%10%B#BBB~C#CCC}</P><P>Question text {1:MULTICHOICE_V:=A#AAA~%10%B#BBB~C#CCC}</P><P>Question text {1:MULTICHOICE:=A#AAA~%10%B#BBB~C#CCC}</P><P>Question text {1:MULTICHOICE_HS:=A#AAA~%10%B#BBB~C#CCC}</P><P>Question text {1:MULTICHOICE_VS:=A#AAA~%10%B#BBB~C#CCC}</P><P>Question text {1:MULTICHOICE_S:=A#AAA~%10%B#BBB~C#CCC}</P><P>Question text {1:NUMERICAL:=1:1#1~3:1#3}</P><P>Question text {1:SHORTANSWER:=aaa#1~bbb#3}</P><P></p>]]></text>
+ <text><![CDATA[<p><BR/>Question text {1:MULTICHOICE_H:=A#AAA~%10%B#BBB~C#CCC}<BR/>Question text {1:MULTICHOICE_V:=A#AAA~%10%B#BBB~C#CCC}<BR/>Question text {1:MULTICHOICE:=A#AAA~%10%B#BBB~C#CCC}<BR/>Question text {1:MULTICHOICE_HS:=A#AAA~%10%B#BBB~C#CCC}<BR/>Question text {1:MULTICHOICE_VS:=A#AAA~%10%B#BBB~C#CCC}<BR/>Question text {1:MULTICHOICE_S:=A#AAA~%10%B#BBB~C#CCC}<BR/>Question text {1:NUMERICAL:=1:1#1~3:1#3}<BR/>Question text {1:SHORTANSWER:=aaa#1~bbb#3}<BR/></p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html">
<text><![CDATA[<p>General feedback</p>]]></text>
</generalfeedback>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_htmlonly-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_htmlonly-moodle.ref
new file mode 100644
index 00000000000..437ba5ab122
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_htmlonly-moodle.ref
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<quiz>
+
+<question type="category">
+ <category>
+ <text>$course$/top/HTML Only</text>
+ </category>
+</question>
+
+<question type="multichoice">
+ <name format="html">
+ <text><![CDATA[HTML code]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>A <a href="www.com">$_`'</a> </p>]]></text>
+ </questiontext>
+ <defaultgrade>1.0</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <single>true</single>
+ <shuffleanswers>1</shuffleanswers>
+ <answernumbering>abc</answernumbering>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p><div style="border: 1px solid green; display: inline-block;">HTML contents</div></p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>C</p>]]></text>
+ </answer>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>D</p>]]></text>
+ </answer>
+</question>
+
+</quiz>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_macros-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_macros-moodle.ref
index a87551d8fd8..77047c0bc75 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_macros-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_macros-moodle.ref
@@ -13,7 +13,7 @@
<text><![CDATA[LaTeX Macros]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>The following commands should not be placed in items: <BR/> and </P><P>Find the \(\rm\LaTeX\) logo </p>]]></text>
+ <text><![CDATA[<p>The following commands should not be placed in items: <BR/> and <BR/>Find the \(\rm\LaTeX\) logo </p>]]></text>
</questiontext>
<defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_math-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_math-moodle.ref
new file mode 100644
index 00000000000..9625ae49a7f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_math-moodle.ref
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<quiz>
+
+<question type="category">
+ <category>
+ <text>$course$/top/Math Notations</text>
+ </category>
+</question>
+
+<question type="multichoice">
+ <name format="html">
+ <text><![CDATA[Derivative]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>\[\frac {\partial ^{3} f}{\partial ^{3} x}(x).\] </p>]]></text>
+ </questiontext>
+ <defaultgrade>1.0</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <single>true</single>
+ <shuffleanswers>1</shuffleanswers>
+ <answernumbering>abc</answernumbering>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>\(f&rsquo;(x)\)</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>\(f&rsquo;&rsquo;(x)\)</p>]]></text>
+ </answer>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>\(f&rsquo;&rsquo;&rsquo;(x)\)</p>]]></text>
+ </answer>
+</question>
+<question type="cloze">
+ <name format="html">
+ <text><![CDATA[Other derivatives]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>\[\frac {\partial ^{2} g}{\partial ^{2} t}(t).\] {1:MULTICHOICE_VS:\(g&rsquo;(t)\)~=\(g&rsquo;&rsquo;(t)\)~\(g&rsquo;&rsquo;&rsquo;(t)\)}</p>]]></text>
+ </questiontext>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+</question>
+
+</quiz>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_mathenv-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_mathenv-moodle.ref
index a4e53f8f971..e70f3155a87 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_mathenv-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_mathenv-moodle.ref
@@ -13,7 +13,7 @@
<text><![CDATA[Multiple Choice]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>\[\begin {array}{c}$1\\2\end {array}\] </P><P>\[\begin {array}{c}$1\\2\end {array}\] </P><P>\(\begin {array}{c}$1\\2\end {array}\) </p>]]></text>
+ <text><![CDATA[<p>\[\begin {array}{c}$1\\2\end {array}\] <BR/>\[\begin {array}{c}$1\\2\end {array}\] <BR/>\(\begin {array}{c}$1\\2\end {array}\) </p>]]></text>
</questiontext>
<defaultgrade>1.0</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
@@ -41,9 +41,8 @@
<text><![CDATA[Cloze]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>\[\begin {array}{c}$1\\2\end {array}\] </P><P>\[\begin {array}{c}$1\\2\end {array}\] </P><P>\(\begin {array}{c}$1\\2\end {array}\) {1:MULTICHOICE_VS:=\($\sqrt {25\}\)~6~=7#\[$\sqrt {25\}\]~%10%8}</p>]]></text>
+ <text><![CDATA[<p>\[\begin {array}{c}$1\\2\end {array}\] <BR/>\[\begin {array}{c}$1\\2\end {array}\] <BR/>\(\begin {array}{c}$1\\2\end {array}\) {1:MULTICHOICE_VS:=\($\sqrt {25\}\)~6~=7#\[$\sqrt {25\}\]~%10%8}</p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_paragraph_breaks-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_paragraph_breaks-moodle.ref
new file mode 100644
index 00000000000..dfe5e349d8f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_paragraph_breaks-moodle.ref
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<quiz>
+
+<question type="category">
+ <category>
+ <text>$course$/top/Paragraph Breaks</text>
+ </category>
+</question>
+
+<question type="multichoice">
+ <name format="html">
+ <text><![CDATA[Multi]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>A </p>]]></text>
+ </questiontext>
+ <defaultgrade>1</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <single>true</single>
+ <shuffleanswers>1</shuffleanswers>
+ <answernumbering>abc</answernumbering>
+ <answer fraction="100" format="html">
+ <text><![CDATA[<p>B <BR/>C</p>]]></text>
+ </answer>
+ <answer fraction="0" format="html">
+ <text><![CDATA[<p>D</p>]]></text>
+ </answer>
+</question>
+<question type="cloze">
+ <name format="html">
+ <text><![CDATA[Close-multi]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>A {1:MULTICHOICE_VS:=B <BR/>C~D}</p>]]></text>
+ </questiontext>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+</question>
+<question type="essay">
+ <name format="html">
+ <text><![CDATA[Essay]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>A </p>]]></text>
+ </questiontext>
+ <defaultgrade>1</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <responserequired>0</responserequired>
+ <responseformat>editor</responseformat>
+ <responsefieldlines>15</responsefieldlines>
+ <attachments>0</attachments>
+ <attachmentsrequired>0</attachmentsrequired>
+ <graderinfo format="html"><text><![CDATA[
+ <ul>
+ <li>B <BR/>C </li>
+ <li>D</li>
+ </ul>
+ ]]></text></graderinfo>
+ <responsetemplate format="html"><text/></responsetemplate>
+</question>
+
+</quiz>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_shortanswer-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_shortanswer-moodle.ref
new file mode 100644
index 00000000000..47d59f63626
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_shortanswer-moodle.ref
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<quiz>
+
+<question type="category">
+ <category>
+ <text>$course$/top/Example Quiz</text>
+ </category>
+</question>
+
+<question type="shortanswer">
+ <name format="html">
+ <text><![CDATA[Short Answer]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>Enter the string <CODE>&rdquo;40%&rdquo;</CODE>. </p>]]></text>
+ </questiontext>
+ <defaultgrade>1.0</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <usecase>0</usecase>
+ <answer fraction="100" format="plain_text">
+ <text>40%</text>
+ <feedback format="html"><text><![CDATA[<p>correct \((1+\sqrt {5})/2\)</p>]]></text></feedback>
+ </answer>
+ <answer fraction="50" format="plain_text">
+ <text>40</text>
+ <feedback format="html"><text><![CDATA[<p>incomplete \((1+\sqrt {5})/2\)</p>]]></text></feedback>
+ </answer>
+ <answer fraction="50" format="plain_text">
+ <text>%</text>
+ <feedback format="html"><text><![CDATA[<p>incomplete \((1+\sqrt {5})/2\)</p>]]></text></feedback>
+ </answer>
+</question>
+<question type="cloze">
+ <name format="html">
+ <text><![CDATA[Short Answer in Cloze]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>Enter the string <CODE>&rdquo;40%&rdquo;</CODE>. {1:SHORTANSWER:=40%#correct \((1+\sqrt {5\})/2\)~%50%40#incomplete \((1+\sqrt {5\})/2\)~%50%%#incomplete \((1+\sqrt {5\})/2\)}</p>]]></text>
+ </questiontext>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+</question>
+
+</quiz>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_special_characters-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_special_characters-moodle.ref
index 6df44274c1c..38939cbed40 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_special_characters-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_special_characters-moodle.ref
@@ -10,10 +10,10 @@
<question type="multichoice">
<name format="html">
- <text><![CDATA[Å À Â Ã É È Ë Ê Î à Ñ Õ Ô Ö Ù Ü Û Ç Ş Ţ ŠŰ Ÿ Ă Ĕ Ğ Ĭ Ŏ Ŭ Č Ď Ě Ľ Ň Ř Š Ť Ž ]]></text>
+ <text><![CDATA[Å À Â Ã É È Ë Ê Î à Ñ Õ Ô Ö Ù Ü Û Ç Ş Ţ ŠŰ Ÿ Ą Ę Į Ǫ Ų Ă Ĕ Ğ Ĭ Ŏ Ŭ Č Ď Ě Ľ Ň Ř Š Ť Ž ]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>Ã¥ à â ã é è ë ê î ï ñ õ ô ö ù ü û ç ÅŸ Å£ Å‘ ű ÿ ă Ä• ÄŸ Ä­ Å Å­ Ä Ä Ä› ľ ň Å™ Å¡ Å¥ ž <BR/> Ã… À Â Ã É È Ë Ê ÃŽ à Ñ Õ Ô Ö Ù Ãœ Û Ç Åž Å¢ Å Å° Ÿ Ä‚ Ä” Äž Ĭ ÅŽ Ŭ ÄŒ ÄŽ Äš Ľ Ň Ř Å  Ť Ž <BR/> Å“ æ ß Å’ Æ ẞ Ø Š« ø Å‚ » ¿ ¡ </p>]]></text>
+ <text><![CDATA[<p>Ã¥ à â ã é è ë ê î ï ñ õ ô ö ù ü û ç ÅŸ Å£ Å‘ ű ÿ Ä… Ä™ į Ç« ų ă Ä• ÄŸ Ä­ Å Å­ Ä Ä Ä› ľ ň Å™ Å¡ Å¥ ž <BR/> Ã… À Â Ã É È Ë Ê ÃŽ à Ñ Õ Ô Ö Ù Ãœ Û Ç Åž Å¢ Å Å° Ÿ Ä„ Ę Ä® Ǫ Ų Ä‚ Ä” Äž Ĭ ÅŽ Ŭ ÄŒ ÄŽ Äš Ľ Ň Ř Å  Ť Ž <BR/> Å“ æ ß Å’ Æ ẞ Ø Š« ø Å‚ » ¿ ¡ </p>]]></text>
</questiontext>
<defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
@@ -23,20 +23,20 @@
<shuffleanswers>1</shuffleanswers>
<answernumbering>abc</answernumbering>
<answer fraction="0" format="html">
- <text><![CDATA[<p>Ã¥ à â ã é è ë ê î ï ñ õ ô ö ù ü û ç ÅŸ Å£ Å‘ ű ÿ ă Ä• ÄŸ Ä­ Å Å­ Ä Ä Ä› ľ ň Å™ Å¡ Å¥ ž </p>]]></text>
- <feedback format="html"><text><![CDATA[<p>Å À Â Ã É È Ë Ê Î à Ñ Õ Ô Ö Ù Ü Û Ç Ş Ţ ŠŰ Ÿ Ă Ĕ Ğ Ĭ Ŏ Ŭ Č Ď Ě Ľ Ň Ř Š Ť Ž </p>]]></text></feedback>
+ <text><![CDATA[<p>Ã¥ à â ã é è ë ê î ï ñ õ ô ö ù ü û ç ÅŸ Å£ Å‘ ű ÿ Ä… Ä™ į Ç« ų ă Ä• ÄŸ Ä­ Å Å­ Ä Ä Ä› ľ ň Å™ Å¡ Å¥ ž </p>]]></text>
+ <feedback format="html"><text><![CDATA[<p>Å À Â Ã É È Ë Ê Î à Ñ Õ Ô Ö Ù Ü Û Ç Ş Ţ ŠŰ Ÿ Ą Ę Į Ǫ Ų Ă Ĕ Ğ Ĭ Ŏ Ŭ Č Ď Ě Ľ Ň Ř Š Ť Ž </p>]]></text></feedback>
</answer>
<answer fraction="100" format="html">
- <text><![CDATA[<p>Å À Â Ã É È Ë Ê Î à Ñ Õ Ô Ö Ù Ü Û Ç Ş Ţ ŠŰ Ÿ Ă Ĕ Ğ Ĭ Ŏ Ŭ Č Ď Ě Ľ Ň Ř Š Ť Ž </p>]]></text>
- <feedback format="html"><text><![CDATA[<p>Ã¥ à â ã é è ë ê î ï ñ õ ô ö ù ü û ç ÅŸ Å£ Å‘ ű ÿ ă Ä• ÄŸ Ä­ Å Å­ Ä Ä Ä› ľ ň Å™ Å¡ Å¥ ž </p>]]></text></feedback>
+ <text><![CDATA[<p>Å À Â Ã É È Ë Ê Î à Ñ Õ Ô Ö Ù Ü Û Ç Ş Ţ ŠŰ Ÿ Ą Ę Į Ǫ Ų Ă Ĕ Ğ Ĭ Ŏ Ŭ Č Ď Ě Ľ Ň Ř Š Ť Ž </p>]]></text>
+ <feedback format="html"><text><![CDATA[<p>Ã¥ à â ã é è ë ê î ï ñ õ ô ö ù ü û ç ÅŸ Å£ Å‘ ű ÿ Ä… Ä™ į Ç« ų ă Ä• ÄŸ Ä­ Å Å­ Ä Ä Ä› ľ ň Å™ Å¡ Å¥ ž </p>]]></text></feedback>
</answer>
</question>
<question type="multichoice">
<name format="html">
- <text><![CDATA[&Aring; &Agrave; &Acirc; &Atilde; &Eacute; &Egrave; &Euml; &Ecirc; &Icirc; &Iuml; &Ntilde; &Otilde; &Ouml; &Ocirc; &Ugrave; &Uuml; &Ucirc; &Ccedil; &#350; &#354; &#336; &#368; &Yuml; &Abreve; &#276; &Gbreve; &#300; &#334; &Ubreve; &Ccaron; &Dcaron; &Ecaron; &Lcaron; &Ncaron; &Rcaron; &Scaron; &Tcaron; &Zcaron; ]]></text>
+ <text><![CDATA[&Aring; &Agrave; &Acirc; &Atilde; &Eacute; &Egrave; &Euml; &Ecirc; &Icirc; &Iuml; &Ntilde; &Otilde; &Ouml; &Ocirc; &Ugrave; &Uuml; &Ucirc; &Ccedil; &#350; &#354; &#336; &#368; &Yuml; &Aogon; &Eogon; &Iogon; &#490; &Uogon; &Abreve; &#276; &Gbreve; &#300; &#334; &Ubreve; &Ccaron; &Dcaron; &Ecaron; &Lcaron; &Ncaron; &Rcaron; &Scaron; &Tcaron; &Zcaron; ]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>&aring; &agrave; &acirc; &atilde; &eacute; &egrave; &euml; &ecirc; &icirc; &iuml; &ntilde; &otilde; &ouml; &ocirc; &ugrave; &uuml; &ucirc; &ccedil; &#351; &#355; &#337; &#369; &yuml; &abreve; &#277; &gbreve; &#301; &#301; &#335; &ubreve; &ccaron; &dcaron; &ecaron; &lcaron; &ncaron; &rcaron; &scaron; &tcaron; &zcaron; <BR/> &Aring; &Agrave; &Acirc; &Atilde; &Eacute; &Egrave; &Euml; &Ecirc; &Icirc; &Iuml; &Ntilde; &Otilde; &Ouml; &Ocirc; &Ugrave; &Uuml; &Ucirc; &Ccedil; &#350; &#354; &#336; &#368; &Yuml; &Abreve; &#276; &Gbreve; &#300; &#334; &Ubreve; &Ccaron; &Dcaron; &Ecaron; &Lcaron; &Ncaron; &Rcaron; &Scaron; &Tcaron; &Zcaron; <BR/> &oelig; &aelig; &szlig; &OElig; &AElig; &#7838; &Oslash; &Lstrok; &laquo;&#8239; &oslash; &lstrok; &#8239;&raquo; &iquest; &iexcl; </p>]]></text>
+ <text><![CDATA[<p>&aring; &agrave; &acirc; &atilde; &eacute; &egrave; &euml; &ecirc; &icirc; &iuml; &ntilde; &otilde; &ouml; &ocirc; &ugrave; &uuml; &ucirc; &ccedil; &#351; &#355; &#337; &#369; &yuml; &aogon; &eogon; &iogon; &#491; &uogon; &abreve; &#277; &gbreve; &#301; &#301; &#335; &ubreve; &ccaron; &dcaron; &ecaron; &lcaron; &ncaron; &rcaron; &scaron; &tcaron; &zcaron; <BR/> &Aring; &Agrave; &Acirc; &Atilde; &Eacute; &Egrave; &Euml; &Ecirc; &Icirc; &Iuml; &Ntilde; &Otilde; &Ouml; &Ocirc; &Ugrave; &Uuml; &Ucirc; &Ccedil; &#350; &#354; &#336; &#368; &Yuml; &Aogon; &Eogon; &Iogon; &#490; &Uogon; &Abreve; &#276; &Gbreve; &#300; &#334; &Ubreve; &Ccaron; &Dcaron; &Ecaron; &Lcaron; &Ncaron; &Rcaron; &Scaron; &Tcaron; &Zcaron; <BR/> &oelig; &aelig; &szlig; &OElig; &AElig; &#7838; &Oslash; &Lstrok; &laquo;&#8239; &oslash; &lstrok; &#8239;&raquo; &iquest; &iexcl; </p>]]></text>
</questiontext>
<defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
@@ -46,12 +46,12 @@
<shuffleanswers>1</shuffleanswers>
<answernumbering>abc</answernumbering>
<answer fraction="0" format="html">
- <text><![CDATA[<p>&aring; &agrave; &acirc; &atilde; &eacute; &egrave; &euml; &ecirc; &icirc; &iuml; &ntilde; &otilde; &ouml; &ocirc; &ugrave; &uuml; &ucirc; &ccedil; &#351; &#355; &#337; &#369; &yuml; &abreve; &#277; &gbreve; &#301; &#301; &#335; &ubreve; &ccaron; &dcaron; &ecaron; &lcaron; &ncaron; &rcaron; &scaron; &tcaron; &zcaron; </p>]]></text>
- <feedback format="html"><text><![CDATA[<p>&Aring; &Agrave; &Acirc; &Atilde; &Eacute; &Egrave; &Euml; &Ecirc; &Icirc; &Iuml; &Ntilde; &Otilde; &Ouml; &Ocirc; &Ugrave; &Uuml; &Ucirc; &Ccedil; &#350; &#354; &#336; &#368; &Yuml; &Abreve; &#276; &Gbreve; &#300; &#334; &Ubreve; &Ccaron; &Dcaron; &Ecaron; &Lcaron; &Ncaron; &Rcaron; &Scaron; &Tcaron; &Zcaron; </p>]]></text></feedback>
+ <text><![CDATA[<p>&aring; &agrave; &acirc; &atilde; &eacute; &egrave; &euml; &ecirc; &icirc; &iuml; &ntilde; &otilde; &ouml; &ocirc; &ugrave; &uuml; &ucirc; &ccedil; &#351; &#355; &#337; &#369; &yuml; &aogon; &eogon; &iogon; &#491; &uogon; &abreve; &#277; &gbreve; &#301; &#301; &#335; &ubreve; &ccaron; &dcaron; &ecaron; &lcaron; &ncaron; &rcaron; &scaron; &tcaron; &zcaron; </p>]]></text>
+ <feedback format="html"><text><![CDATA[<p>&Aring; &Agrave; &Acirc; &Atilde; &Eacute; &Egrave; &Euml; &Ecirc; &Icirc; &Iuml; &Ntilde; &Otilde; &Ouml; &Ocirc; &Ugrave; &Uuml; &Ucirc; &Ccedil; &#350; &#354; &#336; &#368; &Yuml; &Aogon; &Eogon; &Iogon; &#490; &Uogon; &Abreve; &#276; &Gbreve; &#300; &#334; &Ubreve; &Ccaron; &Dcaron; &Ecaron; &Lcaron; &Ncaron; &Rcaron; &Scaron; &Tcaron; &Zcaron; </p>]]></text></feedback>
</answer>
<answer fraction="100" format="html">
- <text><![CDATA[<p>&Aring; &Agrave; &Acirc; &Atilde; &Eacute; &Egrave; &Euml; &Ecirc; &Icirc; &Iuml; &Ntilde; &Otilde; &Ouml; &Ocirc; &Ugrave; &Uuml; &Ucirc; &Ccedil; &#350; &#354; &#336; &#368; &Yuml; &Abreve; &#276; &Gbreve; &#300; &#334; &Ubreve; &Ccaron; &Dcaron; &Ecaron; &Lcaron; &Ncaron; &Rcaron; &Scaron; &Tcaron; &Zcaron; </p>]]></text>
- <feedback format="html"><text><![CDATA[<p>&aring; &agrave; &acirc; &atilde; &eacute; &egrave; &euml; &ecirc; &icirc; &iuml; &ntilde; &otilde; &ouml; &ocirc; &ugrave; &uuml; &ucirc; &ccedil; &#351; &#355; &#337; &#369; &yuml; &abreve; &#277; &gbreve; &#301; &#301; &#335; &ubreve; &ccaron; &dcaron; &ecaron; &lcaron; &ncaron; &rcaron; &scaron; &tcaron; &zcaron; </p>]]></text></feedback>
+ <text><![CDATA[<p>&Aring; &Agrave; &Acirc; &Atilde; &Eacute; &Egrave; &Euml; &Ecirc; &Icirc; &Iuml; &Ntilde; &Otilde; &Ouml; &Ocirc; &Ugrave; &Uuml; &Ucirc; &Ccedil; &#350; &#354; &#336; &#368; &Yuml; &Aogon; &Eogon; &Iogon; &#490; &Uogon; &Abreve; &#276; &Gbreve; &#300; &#334; &Ubreve; &Ccaron; &Dcaron; &Ecaron; &Lcaron; &Ncaron; &Rcaron; &Scaron; &Tcaron; &Zcaron; </p>]]></text>
+ <feedback format="html"><text><![CDATA[<p>&aring; &agrave; &acirc; &atilde; &eacute; &egrave; &euml; &ecirc; &icirc; &iuml; &ntilde; &otilde; &ouml; &ocirc; &ugrave; &uuml; &ucirc; &ccedil; &#351; &#355; &#337; &#369; &yuml; &aogon; &eogon; &iogon; &#491; &uogon; &abreve; &#277; &gbreve; &#301; &#301; &#335; &ubreve; &ccaron; &dcaron; &ecaron; &lcaron; &ncaron; &rcaron; &scaron; &tcaron; &zcaron; </p>]]></text></feedback>
</answer>
</question>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tags-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tags-moodle.ref
index cb8af5edc68..ad3e2404094 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tags-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tags-moodle.ref
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+
<quiz>
<question type="category">
@@ -31,6 +32,7 @@
</answer>
<tags>
<tag><text><![CDATA[multiéàî]]></text></tag>
+ <tag><text><![CDATA[&Aring;&aelig;&oelig;]]></text></tag>
</tags>
</question>
<question type="shortanswer">
@@ -58,6 +60,8 @@
</answer>
<tags>
<tag><text><![CDATA[quizz-level]]></text></tag>
+ <tag><text><![CDATA[ leading whitespace]]></text></tag>
+ <tag><text><![CDATA[with, comma]]></text></tag>
</tags>
</question>
<question type="numerical">
@@ -100,11 +104,11 @@
<shuffleanswers>1</shuffleanswers>
<subquestion format="html">
<text><![CDATA[<p>&aelig;</p>]]></text>
- <answer><text>oui</text></answer>
+ <answer><text>oui </text></answer>
</subquestion>
<subquestion format="html">
<text><![CDATA[<p>&oelig;</p>]]></text>
- <answer><text>non</text></answer>
+ <answer><text>non </text></answer>
</subquestion>
<subquestion format="html">
<text></text>
@@ -141,14 +145,50 @@
<tag><text><![CDATA[essay]]></text></tag>
</tags>
</question>
+<question type="description">
+ <name format="html">
+ <text><![CDATA[Title]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>Text</p>]]></text>
+ </questiontext>
+ <defaultgrade>1</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>0.10</penalty>
+ <hidden>0</hidden>
+ <tags>
+ <tag><text><![CDATA[desc]]></text></tag>
+ </tags>
+</question>
+<question type="truefalse">
+ <name format="html">
+ <text><![CDATA[Title]]></text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>&Aring;</p>]]></text>
+ </questiontext>
+ <defaultgrade>1</defaultgrade>
+ <generalfeedback format="html"><text/></generalfeedback>
+ <penalty>1</penalty>
+ <hidden>0</hidden>
+ <answer fraction="100" format="plain_text">
+ <text>true</text>
+ <feedback format="html"><text><![CDATA[<p> &aelig;yo </p>]]></text></feedback>
+ </answer>
+ <answer fraction="0" format="plain_text">
+ <text>false</text>
+ </answer>
+ <tags>
+ <tag><text><![CDATA[TF]]></text></tag>
+ </tags>
+</question>
<question type="cloze">
<name format="html">
<text><![CDATA[Cloze]]></text>
</name>
<questiontext format="html">
- <text><![CDATA[<p>&Aring;&OElig;{1:MULTICHOICE:=chip~%10%chop#yes~chap#no.}&#8239;&raquo;&Aring;{1:SHORTANSWER:=B#toc~=C#&laquo;&#8239;&#8239;&raquo;~*}&laquo;&#8239;&Aring;{1:NUMERICAL:=1:0~=2:0#&laquo;&#8239;&#8239;&raquo;~3:0}&OElig;{1:MULTICHOICE_V:=chip#yes~%10%chop~chap#no.}</P><P>&OElig;{1:MULTICHOICE_H:=chip#yes~%10%chop~chap#no.}</P><P></p>]]></text>
+ <text><![CDATA[<p>&Aring;&OElig;{1:MULTICHOICE:=chip~%10%chop#yes~chap#no.}&#8239;&raquo;&Aring;{1:SHORTANSWER:=B#toc~=C#&laquo;&#8239;&#8239;&raquo;~*}&laquo;&#8239;&Aring;{1:NUMERICAL:=1:0~=2:0#&laquo;&#8239;&#8239;&raquo;~3:0}&OElig;{1:MULTICHOICE_V:=chip#yes~%10%chop~chap#no.}<BR/>&OElig;{1:MULTICHOICE_H:=chip#yes~%10%chop~chap#no.}<BR/></p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tikz-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tikz-moodle.ref
index 48d857aeae0..7f7529784f4 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tikz-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tikz-moodle.ref
@@ -199,7 +199,7 @@ XhgAAABTSURBVAjXY2DABNMc3QMYGN69ewFk7+hQAJILwOIQcklFIZC8xpADlHBg4AYLcjxiYHFg
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv3aB7AAAAD3RSTlMAESIzRFVmd4iZqrvM
3e5GKvWZAAAAUElEQVQI12NgwAAREGolmGT8CqbYHoAprglgSl8BTHVCVFwCUxwNYMobTDNe5CsA
UtIG9gZAzinHOiCHOyTzThpYzQsHEMn8Gcxhf4CsHQQAyX8PqblssX8AAAAASUVORK5CYII=
-">}</P><P><IMG SRC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAVBAMAAACNnGLAAAAAHlBMVEX///8AAAAAAAAAAAAAAAAA
+">}<BR/><IMG SRC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAVBAMAAACNnGLAAAAAHlBMVEX///8AAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAACGjDitAAAACXRSTlMAESJEiJm7zO6nttlqAAAAIklEQVQI12NgwAlEgJjJ
tRJIMhp4gkXIJAWARFpnmQOmFQA1jwXeV/vvCgAAAABJRU5ErkJggg==
"> {1:SHORTANSWER:=3#<IMG SRC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAVBAMAAABiXgn+AAAALVBMVEX///8AAAAAAAAAAAAAAAAA
@@ -211,7 +211,7 @@ TkSuQmCC
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv3aB7AAAAD3RSTlMAESIzRFVmd4iZqrvM
3e5GKvWZAAAAUElEQVQI12NgwAAREGolmGT8CqbYHoAprglgSl8BTHVCVFwCUxwNYMobTDNe5CsA
UtIG9gZAzinHOiCHOyTzThpYzQsHEMn8Gcxhf4CsHQQAyX8PqblssX8AAAAASUVORK5CYII=
-">}</P><P><IMG SRC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAVBAMAAACNnGLAAAAAHlBMVEX///8AAAAAAAAAAAAAAAAA
+">}<BR/><IMG SRC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAVBAMAAACNnGLAAAAAHlBMVEX///8AAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAACGjDitAAAACXRSTlMAESJEiJm7zO6nttlqAAAAIklEQVQI12NgwAlEgJjJ
tRJIMhp4gkXIJAWARFpnmQOmFQA1jwXeV/vvCgAAAABJRU5ErkJggg==
"> {1:NUMERICAL:=3:0#<IMG SRC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAVBAMAAABiXgn+AAAALVBMVEX///8AAAAAAAAAAAAAAAAA
@@ -225,7 +225,6 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv3aB7AAAAD3RSTlMAESIzRFVmd4iZqrvM
UtIG9gZAzinHOiCHOyTzThpYzQsHEMn8Gcxhf4CsHQQAyX8PqblssX8AAAAASUVORK5CYII=
">}</p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tikz_with_svg-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tikz_with_svg-moodle.ref
index 065da7b2f81..86a59ce2b01 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tikz_with_svg-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tikz_with_svg-moodle.ref
@@ -319,7 +319,7 @@ YW5zZm9ybT0ibWF0cml4KDEsMCwwLC0xLDAsMi42MykiIGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFt
aWx5PSJMTVJvbWFuMTAiIGZvbnQtc2l6ZT0iOS45NjI2cHgiIGZvbnQtc3R5bGU9Iml0YWxpYyI+
PHRzcGFuIHg9IjAiIHk9IjAiPjQ8L3RzcGFuPjwvdGV4dD48L2c+PC9nPjwvZz48L2c+PC9zdmc+
Cg==
-">}</P><P><IMG SRC="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNi42NDEz
+">}<BR/><IMG SRC="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNi42NDEz
IiBoZWlnaHQ9IjEzLjI4NCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgNi42NDEzIDEzLjI4
NCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3Zn
Ij48ZyB0cmFuc2Zvcm09Im1hdHJpeCgxLjMzMzMgMCAwIC0xLjMzMzMgMCAxMy4yODQpIj48ZyB0
@@ -348,7 +348,7 @@ YW5zZm9ybT0ibWF0cml4KDEsMCwwLC0xLDAsMi42MykiIGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFt
aWx5PSJMTVJvbWFuMTAiIGZvbnQtc2l6ZT0iOS45NjI2cHgiIGZvbnQtc3R5bGU9Iml0YWxpYyI+
PHRzcGFuIHg9IjAiIHk9IjAiPjQ8L3RzcGFuPjwvdGV4dD48L2c+PC9nPjwvZz48L2c+PC9zdmc+
Cg==
-">}</P><P><IMG SRC="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNi42NDEz
+">}<BR/><IMG SRC="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNi42NDEz
IiBoZWlnaHQ9IjEzLjI4NCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgNi42NDEzIDEzLjI4
NCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3Zn
Ij48ZyB0cmFuc2Zvcm09Im1hdHJpeCgxLjMzMzMgMCAwIC0xLjMzMzMgMCAxMy4yODQpIj48ZyB0
@@ -379,7 +379,6 @@ PHRzcGFuIHg9IjAiIHk9IjAiPjQ8L3RzcGFuPjwvdGV4dD48L2c+PC9nPjwvZz48L2c+PC9zdmc+
Cg==
">}</p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tolerance-moodle.ref b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tolerance-moodle.ref
index beed570d8c0..4472ab9ca06 100644
--- a/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tolerance-moodle.ref
+++ b/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tolerance-moodle.ref
@@ -63,7 +63,6 @@
<questiontext format="html">
<text><![CDATA[<p>Give a number {1:NUMERICAL:=1:4~=0:3~*#nope}Give a number {1:NUMERICAL:=1:4~=0:2~*#nope}</p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
@@ -75,7 +74,6 @@
<questiontext format="html">
<text><![CDATA[<p>Give a number {1:NUMERICAL:=1,45e-3:1,65E-4~=0:0~*#nope}</p>]]></text>
</questiontext>
- <defaultgrade>1</defaultgrade>
<generalfeedback format="html"><text/></generalfeedback>
<penalty>0.10</penalty>
<hidden>0</hidden>
diff --git a/Master/texmf-dist/source/latex/moodle/makefile b/Master/texmf-dist/source/latex/moodle/makefile
index d3bf3576f7b..b77b462daa0 100644
--- a/Master/texmf-dist/source/latex/moodle/makefile
+++ b/Master/texmf-dist/source/latex/moodle/makefile
@@ -26,7 +26,7 @@ distclean: clean
distclean: $(TESTDIR)/distclean
rm -rf *.pdf *.xml *.zip
- rm -rf texmf/ $(@mkdir -p ./$(PROJECT_NAME)/
+ rm -rf texmf/ ./$(PROJECT_NAME)/
test: $(TESTDIR)/test
diff --git a/Master/texmf-dist/source/latex/moodle/moodle.dtx b/Master/texmf-dist/source/latex/moodle/moodle.dtx
index 17a7b125b41..9e932fb5760 100644
--- a/Master/texmf-dist/source/latex/moodle/moodle.dtx
+++ b/Master/texmf-dist/source/latex/moodle/moodle.dtx
@@ -17,7 +17,7 @@
% The Current Maintainer of this work is Matthieu Guerquin-Kern.
%
% This work consists of the files moodle.dtx and moodle.ins
-% and the derived files moodle.sty and getitems.sty.
+% and the derived file moodle.sty.
%
% \fi
%
@@ -28,7 +28,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{moodle}
%<*package>
- [2021/01/04 v0.8 Moodle quiz XML generation]
+ [2021/02/07 v0.9 Moodle quiz XML generation]
%</package>
%
%<*driver>
@@ -44,7 +44,8 @@
\setmainfont[Mapping=tex-text]{Linux Libertine O}
\fi
%\usepackage{moodle}[2020/07/09]
-\usepackage{amssymb,metalogo,multirow,threeparttable,booktabs,hyperref,tikz,minted,changelog}
+\usepackage{amssymb,metalogo,multirow,threeparttable,booktabs}
+\usepackage{hyperref,tikz,minted,changelog}
\usetikzlibrary{arrows,positioning,decorations.text}
%\usemintedstyle{Wombat}
\EnableCrossrefs
@@ -58,7 +59,7 @@
%</driver>
% \fi
%
-% \CheckSum{7442} ^^A Comment \OnlyDescription above to adjust
+% \CheckSum{7729} ^^A Comment \OnlyDescription above to adjust
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -89,9 +90,9 @@
% \author{Anders Hendrickson\footnote{original author of the package (\texttt{v0.5}), inactive.}\\
% \texttt{anders.o.f.hendrickson AT gmail.com} \and
% Matthieu Guerquin-Kern\footnote{current maintainer, author of the updates (\texttt{v0.6}
-% to \texttt{v0.8}), partially funded by \href{https://www.ensea.fr/en/}{ENSEA Graduate School}, France.}\\
+% to \texttt{v0.9}), partially funded in 2019 by \href{https://www.ensea.fr/en/}{ENSEA Graduate School}, France.}\\
% \href{mailto:guerquin-kern AT crans.org}{guerquin-kern AT crans.org}}
-% \date{January 4, 2021}
+% \date{February 7, 2021}
%
% \maketitle
%
@@ -238,11 +239,15 @@
% \end{figure}
%
% \section{Usage}\label{sect:usage}
-% \subsection{Example Document}
-%
% The following pages presume the reader already has some familiarity with creating
% and editing Moodle quizzes through the web interface.
+% Users that are not familiar with Moodle quizzes can learn more in the Moodle
+% documentation. For instance, \url{https://docs.moodle.org/310/en/Question_types}.
+%
% The |xkeyval| package is used to provide a key-value interface.
+%
+% \subsection{Example Document}
+%
% Here is a simple example document:
% \begin{VerbatimOut}[gobble=1]{minted.doc.out}
% \documentclass[12pt]{article}
@@ -318,7 +323,7 @@
% file. This stamp contains information gathered about the TeX engine,
% the operating system used and the package version. For instance:
% \begin{quote}\small
-% |<!-- This file was generated on 2020-11-30 by LuaLaTeX -->|\\
+% |<!-- This file was generated on 2021-01-07 by LuaLaTeX -->|\\
% |<!-- running on Linux with the package moodle |\texttt{\fileversion}| -->|
% \end{quote}
% The package option
@@ -454,28 +459,34 @@
% may also be given by setting the |feedback| key \emph{at the individual answer}.
%
% \DescribeMacro{tags}
-% The |tags| key sets a keyword for the question that will be taken into account by Moodle for
-% filtering purposes or classification of questions inside the question bank. It is possible
-% for instance to build a quiz with questions cherry-picked among the set of questions holding
-% a particular tag.
+% The |tags| key sets a list of keywords for the question that will be taken into account
+% by Moodle for filtering purposes or classification of questions inside the question bank.
+% It is possible for instance to build a quiz with questions cherry-picked among the set of
+% questions holding a particular tag.
% For example, one might set
% \begin{center}
% |tags={easy}|
% \end{center}
-% The desired tag should be included in braces.
+% The desired tag should be specified in between braces. Multiple tags can be set as a
+% comma-separated list:
+% \begin{center}
+% |tags={tag1,tag2,{ leading whitespace},{including, comma}}|
+% \end{center}
%
-% Tags can be assigned at two levels. If the |tags| key is set at the quiz level,
-% then that tags will be assigned by default to each question of the quiz.
+% Tags can be assigned at two levels. If the |tags| key is set at the quiz level,
+% then that tag list will serve as a default for each question of the quiz.
% Question-specific tags can be assigned by setting the |tags| key \emph{at the question level}.
-% Since only single tag is supported, the tag a the question-level overrides eventual tags
-% specified at the quiz-level.
+% The question-level |tags| key overrides eventual quiz-level tags.
+%
+% Users willing to specify a same tag for all questions of the quiz could
+% also rely on Moodle's category mechanism.
%
-% \subsection{Question Types}
+% \subsection{\href{https://docs.moodle.org/en/Question_types}{Question Types}}
%
% We next discuss the various question types supported by \textsf{moodle}
% and the options that may be set.
%
-%\subsubsection{True/False}
+%\subsubsection{\href{https://docs.moodle.org/en/True/False_question_type}{True/False}}
%
% \DescribeMacro{truefalse}
% The syntax for a True/False question is as follows:
@@ -502,7 +513,7 @@
%
% With the True/False question type, the |penalty| key has no effect.
%
-% \subsubsection{Multiple Choice}
+% \subsubsection{\href{https://docs.moodle.org/310/Multiple_Choice_question_type}{Multiple Choice}}
%
% \DescribeMacro{multi}
% The syntax for a classic multiple choice question,
@@ -593,7 +604,22 @@
% Note that, in this example, negative fractions are set for wrong choices. This
% prevents students selecting all options to obtain a good grade with no merit.
%
-% \subsubsection{Numerical}
+% \DescribeMacro{allornothing}
+% There also exists a \href{https://moodle.org/plugins/qtype_multichoiceset}
+% {``All-or-Nothing Multiple Choice''} plugin for Moodle that introduces a
+% question type similar to a multiple choice with multiple correct answers,
+% with the specificity that the points are given if and only if the student
+% selects all correct answers. This kind of question is set up using the
+% |allornothing| key.
+% The recommended way for designating correct answers is with |\item*|. If instead
+% the |fraction| is used, \textsf{moodle} moodle will consider that non-negative
+% fractions ($>0$) designate correct answers and negative fractions ($\leq 0$)
+% designate incorrect choices.
+% The option |allornothing| supersedes the options |multiple| and |single|.
+% To the best of our knowledge, Moodle does not offer the all-or-nothing behavior
+% for multiple choice questions embedded inside a cloze question.
+%
+% \subsubsection{\href{https://docs.moodle.org/en/Numerical_question_type}{Numerical}}
%
% A numerical question in Moodle requires the student
% to input a real number in decimal form.
@@ -647,7 +673,7 @@
%
% Units, unit-handling and multipliers are currently unsupported.
%
-% \subsubsection{Short Answer}
+% \subsubsection{\href{https://docs.moodle.org/en/Short-Answer_question_type}{Short Answer}}
% A short answer question resembles a numerical question: the student is to fill
% in a text box with a missing word or phrase.
% \begin{quote}
@@ -694,7 +720,7 @@
% \item any non empty answer will match the pattern |*| (wildcard alone).
% \end{itemize}
%
-% \subsubsection{Essay}\label{subsubsect:essay}
+% \subsubsection{\href{https://docs.moodle.org/en/Essay_question_type}{Essay}}\label{subsubsect:essay}
% Instructors may ask essay questions on a Moodle quiz,
% although Moodle's software is not up to the task of grading them!
% Instead each essay question answer must be graded manually by the
@@ -737,6 +763,12 @@
%
% \DescribeMacro{response field lines}
% The key |response field lines| controls the height of the input box.
+% For Moodle, the admissible values are: 5, 10, 15, 20, 25, 30, 35, and 40.
+% If the value set is not admissible, \textsf{moodle} will approximate the value:
+% \begin{itemize}
+% \item with either 5 or 40 if the value set was out of range, or
+% \item with the next multiple of 5 otherwise.
+% \end{itemize}
% The default is |response field lines=15|.
%
% \DescribeMacro{attachments allowed}
@@ -752,7 +784,7 @@
% will edit and/or type over, with the key |template=|\marg{template}.
% The \meta{template} should be enclosed in braces.
%
-% \subsubsection{Matching}
+% \subsubsection{\href{https://docs.moodle.org/en/Matching_question_type}{Matching}}
%
% A matching question offers a series of subquestions
% and a set of possible answers from which to choose.
@@ -784,7 +816,8 @@
% \DescribeMacro{drag and drop}\DescribeMacro{dd}
% The standard matching question offered by Moodle corresponds to
% a dropdown box for choosing the answer to each question.
-% There also exists a ``drag and drop matching'' plugin for Moodle that
+% There also exists a \href{https://docs.moodle.org/310/en/Drag_and_drop_matching_question_type}
+% {``drag and drop matching''} plugin for Moodle that
% shows all questions in one column,
% all answers in a second column, and allows students to drag the correct
% answer to the question using a mouse.
@@ -793,7 +826,8 @@
% If you choose the standard format, then due to the limitations of
% dropdown boxes, no \LaTeX\ or HTML code can be used in the answers.
%
-% \subsubsection{Cloze Questions and Subquestions}
+% \subsubsection{\href{https://docs.moodle.org/en/Embedded_Answers_(Cloze)_question_type}
+% {Cloze Questions and Subquestions}}
%
% A ``cloze question'' has one or more subquestions embedded within a passage of text.
% For example, you might ask students to fill in several missing words within
@@ -852,7 +886,7 @@
% Within a cloze question, the short answer question can be made case sensitive.
% This option, disabled by default, is selected with |case sensitive| or |usecase|.
%
-%\subsubsection{Description}
+%\subsubsection{\href{https://docs.moodle.org/en/Description_question_type}{Description}}
%
% The Moodle description type is not really a question. It is more like a label.
% One can set a |feedback| that the student gets when reviewing the submission.
@@ -878,51 +912,51 @@
% \caption{Options offered at the question and answer levels for each question type.}
% \label{tab:key-options}
% \small
-% \begin{tabular}{*{14}{l}}
+% \begin{tabular}{*{15}{l}}
% \toprule
-% & \multicolumn{10}{l}{Question} & \multicolumn{3}{l}{Answer}\\
-% \cmidrule(lr){2-11}\cmidrule(lr){12-14}
+% & \multicolumn{11}{l}{Question} & \multicolumn{3}{l}{Answer}\\
+% \cmidrule(lr){2-12}\cmidrule(lr){13-15}
% Question type & \rotatebox{90}{points} &
% \rotatebox{90}{penalty} & \rotatebox{90}{feedback} & \rotatebox{90}{tags} &
% \rotatebox{90}{shuffle} & \rotatebox{90}{numbering} & \rotatebox{90}{multiple} &
-% \rotatebox{90}{usecase} & \rotatebox{90}{tolerance} &\rotatebox{90}{dd} &
-% \rotatebox{90}{fraction} & \rotatebox{90}{feedback} &
+% \rotatebox{90}{allornothing} &\rotatebox{90}{usecase} & \rotatebox{90}{tolerance} &
+% \rotatebox{90}{dd} & \rotatebox{90}{fraction} & \rotatebox{90}{feedback} &
% \rotatebox{90}{tolerance}\\\cmidrule(lr){1-1}\cmidrule(lr){2-2}\cmidrule(lr){3-3}
% \cmidrule(lr){4-4}\cmidrule(lr){5-5}\cmidrule(lr){6-6}\cmidrule(lr){7-7}
% \cmidrule(lr){8-8}\cmidrule(lr){9-9}\cmidrule(lr){10-10}\cmidrule(lr){11-11}
-% \cmidrule(lr){12-12}\cmidrule(lr){13-13}\cmidrule(lr){14-14}
+% \cmidrule(lr){12-12}\cmidrule(lr){13-13}\cmidrule(lr){14-14}\cmidrule(lr){15-15}
% \href{https://docs.moodle.org/35/en/Multiple_Choice_question_type}
% {Multichoice} & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ &
-% $\bullet$ & $\bullet$ & $\bullet$ & & & & $\bullet$ & $\bullet$ \\
+% $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & & & & $\bullet$ & $\bullet$ \\
% \href{https://docs.moodle.org/35/en/Numerical_question_type}{Numerical}
-% & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & & &
+% & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & & & &
% & & $\bullet$ & & $\bullet$ & $\bullet$ & $\bullet$ \\
% \href{https://docs.moodle.org/35/en/Short-Answer_question_type}{Short
-% Answer} & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & & &
+% Answer} & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & & & &
% & $\bullet$ & & & $\bullet$ & $\bullet$ \\
% \href{https://docs.moodle.org/35/en/Matching_question_type}{Matching}
-% & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & &
+% & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & & &
% & & & $\bullet$ & $\bullet$ & \\
% \href{https://docs.moodle.org/35/en/True/False_question_type}
-% {True/False} & $\bullet$ & & $\bullet$ & $\bullet$ & & &
+% {True/False} & $\bullet$ & & $\bullet$ & $\bullet$ & & & &
% & & & & & $\bullet$ \\
% \href{https://docs.moodle.org/35/en/Description_question_type}
-% {Description} & & & $\bullet$ & $\bullet$ & & &
+% {Description} & & & $\bullet$ & $\bullet$ & & & &
% & & & & & \\
% ^^A\href{https://docs.moodle.org/35/en/Essay_question_type}{Essay} & \\\hline%
% \href{https://docs.moodle.org/35/en/Embedded_Answers_(Cloze)_question_type}{Cloze}
-% & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & & &
+% & & $\bullet$ & $\bullet$ & $\bullet$ & & & &
% & & & & & \\\cmidrule(lr){1-1}
-% \hspace{1em}Numerical & $\bullet$ & & & & & &
+% \hspace{1em}Numerical & $\bullet$ & & & & & & &
% & &$\bullet$ & & $\bullet$ & $\bullet$ & $\bullet$ \\
-% \hspace{1em}Short Answer & $\bullet$ & & & & & &
+% \hspace{1em}Short Answer & $\bullet$ & & & & & & &
% & $\bullet$ & & & $\bullet$ & $\bullet$ \\
-% \hspace{1em}Multi (regular) & $\bullet$ & & & & $\bullet$ & & $\bullet$
+% \hspace{1em}Multi (inline) & $\bullet$ & & & & $\bullet$ & & &
% & & & & $\bullet$ & $\bullet$ \\
% \hspace{1em}Multi (horizontal)& $\bullet$ & & & & $\bullet$ & & $\bullet$
-% & & & & $\bullet$ & $\bullet$ \\
-% \hspace{1em}Multi (vertical)& $\bullet$ & & & & $\bullet$ & &
-% & & & & $\bullet$ & $\bullet$ \\
+% & & & & & $\bullet$ & $\bullet$ \\
+% \hspace{1em}Multi (vertical)& $\bullet$ & & & & $\bullet$ & & $\bullet$
+% & & & & & $\bullet$ & $\bullet$ \\
% \bottomrule
% \end{tabular}
% \end{table}
@@ -945,7 +979,7 @@
% \toprule
% \multicolumn{2}{l}{Macros} & Commands & Environnments \\
% \cmidrule(lr){1-2}\cmidrule(lr){3-3}\cmidrule(lr){4-4}
-% |~| & |\#| &|\emph{}| & |\begin{center}|\\
+% |\%| & |\#| &|\emph{}| & |\begin{center}|\\
% |\$| & |\&| &|\textbf{}| & |\begin{enumerate}|\\
% |\\| & |\par| &|\textit{}| & |\begin{itemize}|\\
% |\&| & |\S| & |\texttt{}| & |\begin{tikzpicture}|\\
@@ -956,7 +990,7 @@
% |\euro| & |\texteuro| & |\fup{}| & \\
% |\TeX| & |\LaTeX|& |\textsubscript{}| & \\
% |\_| & |\textbackslash| & |\url{}| & \\
-% & & |\href{}{}| & \\
+% |~| & & |\href{}{}| & \\
% & & |\tikz[]{}| & \\
% & & |\includegraphics[]{}| & \\
% & & |\verbatiminput{}| & \\
@@ -967,22 +1001,40 @@
% \bottomrule
% \end{tabular}
% \end{table}
-% Single and double quotation marks, french quotation marks, inverted exclamation and
-% question marks, and the diacritical
-% commands |\^|, |\'|, |\`|, |\"|, |\~|, |\c|, |\H|, |\u| and |\v| are also handled,
-% as are the characters |\aa|, |\ae|, |\l|, |\oe|, |\o|, |\ss|, and their
-% capitalizations. See Tables~\ref{tab:diacritical}, \ref{tab:ligatures}, and
-% \ref{tab:other} for more details.
+% Single and double quotation marks (with german variants), french quotation marks,
+% inverted exclamation and question marks, and the diacritical
+% commands |\^|, |\'|, |\`|, |\"|, |\~|, |\c|, |\H|, |\k|, |\u| and |\v| are
+% also handled, as are the characters |\aa|, |\ae|, |\l|, |\oe|,
+% |\o|, |\ss|, and their capitalizations. See Tables~\ref{tab:diacritical},
+% \ref{tab:ligatures}, and \ref{tab:other} for more details.
%
% In addition, |<| and |>| will be converted to |&lt;| and |&gt;| \emph{within math mode only}.
% If they should be typed outside of math mode, they will be passed as typed to
% the HTML, and probably interpreted by students' browsers as HTML tags
% or other unpredicated results.
+% A doubled dash will be converted to en-dash |&ndash;| \emph{outside math mode}.
%
% Be aware that \emph{\textsf{moodle} does not know how to convert any
% other \TeX\ or \LaTeX\ commands to HTML.}
% If other sequences are used, they may be passed verbatim to the XML file
% or may cause unpredicted results.
+%
+% \DescribeMacro{\htmlonly}The |\htmlonly|\oarg{Content for traditional output}
+% \marg{HTML content} command is to be used inside question environments (text,
+% answers, or feedback). It lets you pass directly code to the XML file while being
+% ignored for the traditional output (PDF). The HTML content passed as an argument
+% is subject to no particular processing and users should not expect to be able to
+% pass dangerous characters like |\|, |%|, or |#|. An optional argument allows to
+% pass contents to be processed for the traditional output. This argument is
+% ignored for the XML output.
+% For instance, one can write code like this in a question environment
+% \begin{quote}
+% |\htmlonly[\fbox{PDF contents}]{|\\
+% |<div style="border: 1px solid green; display: inline-block;">|\\
+% \rule{10em}{0pt}|HTML contents</div>|\\
+% |}|
+% \end{quote}
+%
% \DescribeMacro{\htmlregister}The |\htmlregister| command lets you specify
% the macros that must be expanded in the XML file. It works only when no
% optional argument is used.
@@ -996,9 +1048,8 @@
% Again, this works only if the macros are defined \emph{without} optional
% argument.
%
-% If you think of another \LaTeX\ command that should be changed to an HTML equivalent,
-% please contact the maintainer at \url{guerquin-kern AT crans.org}
-% so that it may be added to a future revision of the package.
+% If you think of another \LaTeX\ command that should be changed to an HTML
+% equivalent, please have a look at Section~\ref{sec:dev}.
%
% \section{Graphics}
% The \textsf{moodle} package can handle two kinds of graphics seamlessly.
@@ -1042,6 +1093,10 @@
%^^A \marg{native extension}\marg{command line for conversion}.
%
% \subsection{\TikZ\ Pictures}
+% \TikZ\ is a user-friendly syntax layer for PGF, the macro \LaTeX\ package for creating
+% graphics. Users that are not familiar with TikZ\ can learn more here:
+% \url{https://ctan.org/pkg/pgf}.
+%
% When \TikZ\ is loaded and used to define pictures, \textsf{moodle} invokes
% the |external| \TikZ\ library, so that each |tikzpicture| environment is compiled
% to a freestanding PDF file.
@@ -1112,9 +1167,10 @@
% environment or trust the files handled at the system-level, you may want to disable this
% over-zelous security policy. For example,
% \href{https://stackoverflow.com/a/52661288/14608059}{see this}.
-% \item Users of the |circuitikz| package must enclose their circuits' \TikZ\ code in the
-% |tikzpicture| environment instead of |circuitikz|. That is required,
-% as of \TikZ\ 2.1, by the |external| library.
+% \item Users of the |circuitikz| package (\url{https://www.ctan.org/pkg/circuitikz}) must
+% enclose their circuits' \TikZ\ code in the |tikzpicture| environment instead of
+% the historical |circuitikz| environment. That is required, as of \TikZ\ 2.1,
+% by the |external| library.
% \end{itemize}
%
% \subsection{Package Option \texttt{svg}}\label{subsec:svg}
@@ -1169,6 +1225,10 @@
% specified language.
% \end{enumerate}
% The \textsf{moodle} package handles these three commands to pass the code in the output XML.
+% With |\inputminted|, an external Python tool, \textsc{pygmentize}, performs syntax analysis and
+% its HTML formatter is used to populate the XML. With the other commands, the contents of the
+% file is passed as-is to the XML. A drawback of this approach, is that characters |<|, |>|,
+% |&|, |'|, and |"| are likely to mislead the web browser rendering the question on Moodle.
%
% With |\VerbatimInput| and |\inputminted|, the options that are taken care of for XML
% generation are listed in Table~\ref{tab:verbatim-options}. Using |\fvset|\marg{key=value,...},
@@ -1209,6 +1269,53 @@
% \textsf{filecontents} package or \LaTeX\ kernel itself since 2019) or |VerbatimOut|
% (from the \textsf{fancyvrb} and \textsf{fvextra} packages).
%
+% Here is an example:
+% \begin{VerbatimOut}[gobble=2]{minted.doc.out}
+% \documentclass[12pt,a4paper]{article}
+% \usepackage[section]{moodle}
+% \usepackage{minted}
+% \begin{document}
+% \begin{quiz}[tags={minted}]{LaTeX Quiz}
+% \begin{filecontents*}{excerpt.tex}
+% % !TeX encoding = UTF-8
+% % !TeX spellcheck = en_US
+% % !TEX TS-program = lualatex
+% \documentclass{article}
+% \usepackage[nostamp]{moodle}
+% \ifPDFTeX % FOR LATEX and PDFLATEX
+% \usepackage[utf8]{inputenc} % necessary
+% \usepackage[T1]{fontenc} % necessary
+% \else % assuming XELATEX or LUALATEX
+% \usepackage{fontspec}
+% \fi
+% \end{filecontents*}
+% \begin{numerical}[tolerance=0]{Loading a Class}
+% Consider the following \LaTeX\ code excerpt.\\
+% \inputminted[numbers=left]{latex}{excerpt.tex}
+% On which line is the class loaded?
+% \item[feedback={
+% yes! \inputminted[highlightlines={4}]{latex}{excerpt.tex}
+% } ] 4
+% \item[feedback={No. On line 3, there is only a comment.},
+% fraction=0] 3
+% \item[feedback={No. On line 5, the package \texttt{moodle} is loaded.},
+% fraction=0] 5
+% \end{numerical}
+% \begin{multi}[single]{IDE}
+% Consider the following \LaTeX\ code excerpt.\\
+% \inputminted[numbers=left]{latex}{excerpt.tex}
+% Which \TeX\ engine will be used by the IDE for compilation.
+% \item[feedback={Have a closer look at line 3}] \texttt{tex}
+% \item[feedback={Have a closer look at line 3}] \texttt{latex}
+% \item[feedback={Have a closer look at line 3}] \texttt{pdflatex}
+% \item[feedback={Have a closer look at line 3}] \texttt{xelatex}
+% \item* \texttt{lualatex}
+% \end{multi}
+% \end{quiz}
+% \end{document}
+% \end{VerbatimOut}
+% \inputminted[gobble=2,frame=lines]{latex}{minted.doc.out}
+%
% When code decorated with left-side line numbers is placed in question items, the output PDF could
% show a collision between numbers of the item and the first line. To avoid this, |\LVerbatimInput| or
% |\BVerbatimInput| can be used. Instead, when \textsf{minted} is used, the ``left-right'' mode can be
@@ -1217,8 +1324,8 @@
% |\RecustomVerbatimEnvironment{Verbatim}{LVerbatim}{}|
% \end{quote}
%
-% When using utilies from \textsf{fancyvrb}, \textsf{fvextra}, or \textsf{minted}, \textsf{moodle} sets
-% framing options for the display of code in the output PDF:
+% When using utilities from \textsf{fancyvrb}, \textsf{fvextra}, or \textsf{minted}, \textsf{moodle}
+% sets framing options for the display of code in the output PDF:
% \begin{quote}
% |\fvset{frame=lines,label={[Beginning of code]End of code},|\\
% | framesep=3mm,numbersep=9pt}|
@@ -1233,11 +1340,11 @@
% the same prototype.
%
% We suggest to apply a specific tag to these questions. After import in Moodle, when creating
-% a quizz, this tag can be selected to narrow down a random selection of question.
+% a quizz, this tag can be selected to narrow down a random selection of questions.
% This would mimic the behavior of calculated questions while bringing the flexibility of your
% favorite scripting language.
%
-% Here are two examples inspired from the work of A. Wohns. The first one relies on the
+% Here are two examples inspired from the work of A. Vohns. The first one relies on the
% native Lua capabilities of \LuaLaTeX.
% \begin{VerbatimOut}[gobble=1]{minted.doc.out}
% \begin{quiz}[tags={calculated}]{Example Quiz}
@@ -1313,9 +1420,8 @@
% These two codes yield the same XML content.
%
% \section{Known Limitations and Call for Bug Reports}
-% Table~\ref{tab:support-limitations} lists some different features supported, limitations, and
+% Table~\ref{tab:support-limitations} lists some features supported, limitations, and
% bugs.
-%
%\begin{table}[tbp]
%\centering
%\begin{threeparttable}[b]
@@ -1347,7 +1453,7 @@
%yes & $\varnothing$& $\varnothing$ \\\cmidrule(lr){1-1}
%\hspace{1em}Numerical & yes & no\tnote{1} & yes \\
%\hspace{1em}Short Answer & yes & no\tnote{1} & yes\tnote{7} \\
-%\hspace{1em}Multi (regular) & yes & no\tnote{2} & yes\tnote{7} \\
+%\hspace{1em}Multi (inline) & yes & no\tnote{2} & yes\tnote{7} \\
%\hspace{1em}Multi (horizontal) & yes & yes & yes \\
%\hspace{1em}Multi (vertical) & yes & yes & yes \\\bottomrule
%\end{tabular}
@@ -1373,10 +1479,8 @@
%\end{tablenotes}
%\end{threeparttable}
%\end{table}
-%
% Tables~\ref{tab:diacritical}, \ref{tab:ligatures}, and \ref{tab:other} describe the current
-% support for some special characters, accents and other diacritical marks.
-%
+% state of support special characters, accents and other diacritical marks.
%\begin{table}[tbp]
% \centering
% \caption{Support for diacritical marks
@@ -1414,6 +1518,11 @@
% \H{o} & \H{O} & \verb|\H{o}| & \verb|\H{O}| & Unicode and \LaTeX & \LaTeX\ only\\
% \H{u} & \H{U} & \verb|\H{u}| & \verb|\H{U}| & Unicode and \LaTeX & \LaTeX\ only\\
% \"y & \"Y & \verb|\"y| & \verb|\"Y| & Unicode and \LaTeX & \LaTeX only\\
+% \k{a} & \k{A} & \verb|\k{a}| & \verb|\k{A}| & Unicode and \LaTeX & \LaTeX\ only\\
+% \k{e} & \k{E} & \verb|\k{e}| & \verb|\k{E}| & Unicode and \LaTeX & \LaTeX\ only\\
+% \k{i} & \k{I} & \verb|\k{i}| & \verb|\k{I}| & Unicode and \LaTeX & \LaTeX\ only\\
+% \k{o} & \k{O} & \verb|\k{o}| & \verb|\k{O}| & Unicode and \LaTeX & \LaTeX\ only\\
+% \k{u} & \k{U} & \verb|\k{u}| & \verb|\k{U}| & Unicode and \LaTeX & \LaTeX\ only\\
% \u{a} & \u{A} & \verb|\u{a}| & \verb|\u{A}| & Unicode and \LaTeX & \LaTeX\ only\\
% \u{e} & \u{E} & \verb|\u{e}| & \verb|\u{E}| & Unicode and \LaTeX & \LaTeX\ only\\
% \u{g} & \u{G} & \verb|\u{g}| & \verb|\u{G}| & Unicode and \LaTeX & \LaTeX\ only\\
@@ -1431,10 +1540,11 @@
% \bottomrule
% \end{tabular}
% \begin{tablenotes}
-% \item[1] \XeLaTeX\ renders correctly |\u{i}|, that is, without a superscript dot.
-% Instead, with (pdf)\LaTeX\ the rendering of |\u{i}| is flawed by the
-% superposition of the superscript dot and the breve diacritical mark.
-% Both engines render |\u{\i}| as expected.
+% \item[1] The rendering of |\u{i}| is flawed in (pdf)\LaTeX's traditional output.
+% ^^A \XeLaTeX\ renders correctly |\u{i}|, that is, without a superscript dot.
+% ^^A Instead, with (pdf)\LaTeX\ the rendering of |\u{i}| is flawed by the
+% ^^A superposition of the superscript dot and the breve diacritical mark.
+% ^^A Both engines render |\u{\i}| as expected.
% \end{tablenotes}
% \end{threeparttable}
% \end{table}
@@ -1487,11 +1597,13 @@
% \bottomrule
% \end{tabular}
% \begin{tablenotes}
-% \item[1] the package |babel| loaded with option |french| defines |\og| and |\fg| for
-% the same symbols. These are also supported by \textsf{moodle}.
+% \item[1] for the same symbols the package |babel| defines |\flqq| and |\frqq|, and
+% if loaded with option |french| defines |\og| and |\fg|. These commands
+% are also supported by \textsf{moodle}.
% \end{tablenotes}
% \end{threeparttable}
% \end{table}
+%
% Some features of Moodle quizzes have not yet been implemented in \textsf{moodle}.
% Here is a non-exhaustive list.
% \begin{itemize}
@@ -1500,12 +1612,11 @@
%^^A \item Calculated questions; that is, automatically generated numerical questions
%^^A using randomly chosen numbers.
% \item Hints
-% \item Multiple keywords (tags) for questions
+% \item Units handling in numerical questions
% \end{itemize}
% The authors have used this package together with a limited number of colleagues
% for a few semesters of teaching. If other users adopt this package, we fully expect them
-% to find bugs. \emph{Please} send all bugs you find to \url{guerquin-kern@crans.org},
-% so that we can fix them for subsequent versions.
+% to find bugs. If you run into a problem, please have a look at Section~\ref{sec:dev}.
%
% \section{Compatibility}
% This package has been originally written for and tested with the implementation of
@@ -1516,8 +1627,8 @@
%
% As the ultimate purpose of this package is the generation of XML files,
% future versions of \textsf{moodle} will attempt to maintain backwards
-% compatability with earlier versions regarding the XML output, apart from
-% bug fixes.
+% compatibility with earlier versions regarding the XML output, apart from
+% bug fixes.
% Backwards compatibility of the PDF output is not yet guaranteed, however,
% in case the author or users discover better ways for the PDF to display
% the underlying XML data to be proofread.
@@ -1539,12 +1650,71 @@
% but turn ``MathJax'' \emph{on}. This forces \TeX\ code to be rendered by MathJax
% instead of Moodle, producing much higher-quality results.
%
+% \clearpage
+% \section{Package Development}\label{sec:dev}
+% This package is developed as a collaborative project, currently hosted
+% on the Gitlab server instance \url{https://framagit.org/mattgk/moodle}.
+% The project's activity can be monitored there: reported issues, last
+% modifications, \dots
+%
+% Contributions, either bug reports or fixes, are welcome. Users willing to
+% help can either sign-in with an existing \textsf{GitHub}, \textsf{Gitlab.com}, or
+% \textsf{Bitbucket} account or register a new account.
+%
+% Of course, getting in touch with the package maintainer by
+% \href{mailto:guerquin-kernATcrans.org}{email} works as well.
+%
+% When experiencing a problem and before reporting it, please check whether
+% or not something similar has already been filed as an issue
+% \href{https://framagit.org/mattgk/moodle/-/issues?scope=all&state=all}{here}.
+% If the problem appears to be new, please report it by following these steps:
+% \begin{enumerate}
+% \item Prepare a \emph{minimal} working example, i.e. a |.tex| file shunk down
+% to the strict minimum (loaded packages, code, \dots) while still showing the
+% faulty behavior upon compilation.
+% \item Gather and send the |*.tex|, |*.log| and |*-moodle.xml| files together
+% with an explanation about
+% \begin{itemize}
+% \item your working environment (\TeX\ engine and distribution, operating
+% system, \dots),
+% \item the faulty behavior, and
+% \item what you expected instead.
+% \end{itemize}
+% \end{enumerate}
+%
% ^^A\clearpage
% \changes{v0.5}{2016/01/05}{Initial version}
% \changes{v0.6}{2019/02/18}{Bux-fixing release}
% \changes{v0.7}{2020/07/09}{Feature extensions}
% \changes{v0.8}{2021/01/04}{Bug fixes and feature extensions}
+% \changes{v0.9}{2021/02/07}{Bug fixes and feature extensions}
% \begin{changelog}[title={Version History},author={Matthieu Guerquin-Kern}]
+% \begin{version}[version=0.9,date=2021-02-07]
+% \added
+% \item Support for \href{https://docs.moodle.org/310/en/All_or_nothing_multiple_choice_question_type}
+% {all-or-nothing multiple choice} questions.
+% \item Support for the ogonek diacritical mark via |\k|\marg{\dots}.
+% \item Warn user of the \texttt{babel} package set for a German-related language
+% that using the character |"| will not play well with \textsf{moodle}.
+% \item Support for \textsf{babel} commands related to German quotes.
+% \item Support for en-dash (--) outside of math mode.
+% \item Support for |\%| in conversion to HTML.
+% \item Command |\htmlonly[]{}| to pass HTML contents directly to the XML file.
+% \changed
+% \item An error is issued when a graphics conversion step fails.
+% \item Irrelevant points are no longer written at the cloze question level in PDF and XML.
+% \item The total number of marks is shown in the PDF at the end of each quiz.
+% \item The |tags| key can now be used to specify a comma-separated list of tags.
+% \fixed
+% \item Answer text of shortanswer questions is converted to HTML.
+% \item Paragraph breaks in multi and essay items no longer break compilation.
+% \item Question text in Essays was not shown in PDF file.
+% \item Commands |\textsc|, |\underline|, |\url|, and |\href| yielded HTML code with
+% inadequate double quotation marks.
+% \item Broken base64-encoding pipeline for images under Windows (thanks to Andreas Vohns).
+% \item Repeated single right quotation marks no longer merged in math mode
+% (thanks to Alberto Albano).
+% \end{version}
% \begin{version}[version=0.8,date=2021-01-04]
% \added
% \item Support for inclusion of GIF pictures.
@@ -1598,15 +1768,15 @@
% \item Irrelevant \texttt{penalty} tag in cloze subquestions.
% \fixed
% \item Non-integer fractions can now be specified in cloze subquestions.
-% \item Signifiantly squeeze PNG images size by skipping ancillary data.
+% \item Significantly squeeze PNG images size by skipping ancillary data.
% \item Enumerate or itemize environment can now be nested in question items.
% \item Several pictures can be included in a question without being mixed
% in the XML file.
-% \item management and rendering of fraction in questions.
-% \item Correctly handling a \LaTeX\ starting the last item of a question.
+% \item Management and rendering of fraction in questions.
+% \item Correctly handling a \LaTeX\ command starting the last item of a question.
% \item Closing braces escaped in cloze subquestions. This allows \LaTeX\
% equations or images to be included.
-% \item Image inclusion with MacOS.
+% \item Image inclusion with macOS.
% \end{version}
% \begin{version}[version=0.6b,date=2019-11-27]
% \added
@@ -1626,7 +1796,7 @@
% \item General feedbacks can now contain backslashes.
% \item Several quizzes can now be defined in a single source file, each
% specifying a category for Moodle's question bank.
-% \item Correct encoding information in now written in XML depending on
+% \item Correct encoding information is now written in XML depending on
% the \LaTeX\ compiler used.
% \end{version}
% \begin{version}[version=0.6a,date=2019-06-21]
@@ -1634,7 +1804,7 @@
% \item \XeLaTeX\ is now recommended when using UTF8-encoded sources (support
% of accents).
% \item Feedbacks are now displayed in the PDF file produced.
-% \item The \texttt{optipng} utility is used (and required) to reduce the size
+% \item The \texttt{optipng} utility is used to reduce the size
% of images embedded in the XML file.
% \item Question options and settings are now displayed in the PDF file
% \item Supporting more \LaTeX\ macros for symbols and accents (mostly
@@ -1642,7 +1812,7 @@
% \item Introduce shuffle options in cloze-multi subquestions.
% \item Package option \texttt{final}.
% \changed
-% \item In draft mode, \TikZ\ externalization in no longer triggered.
+% \item In draft mode, \TikZ\ externalization is no longer triggered.
% \fixed
% \item In the different question types, the feedback fields are now converted
% for HTML allowing \LaTeX\ equation and images.
@@ -1694,16 +1864,23 @@
\RequirePackage{xkeyval} %For key-handling
\RequirePackage{amssymb} %For \checkmark symbol
%\RequirePackage{trimspaces} %To remove extra spaces from strings (loaded by environ)
-\RequirePackage{etex} %Expansion control, detokenization, etc.
-\RequirePackage{etoolbox}%List management
-\RequirePackage{xpatch} %To patch commands easily in HTML mode
-\RequirePackage{array} %For formatting tables in the LaTeX mode of Clozes
-\RequirePackage{ifplatform} % To choose Ghostscript commands
\@ifpackageloaded{iftex}{}{\RequirePackage{iftex}}
% iftex already required by recent versions of ifplatform. Needed to know:
% 1) whether we can convert output from PDF to PNG (ifpdf),
% 2) when output pdf is latin1-encoded (ifpdf)
% 3) when output xml is utf8-encoded (if?tex)
+\@ifundefined{ifeTeX}{% version of 'iftex' prior to November 2019.
+ \RequirePackage{etex}{}
+}{
+ \ifeTeX\else
+ \RequirePackage{etex}{} % Recent (2015+) TeX engines should be e-TeX.
+ %This is needed for expansion control, detokenization, etc.
+ \fi
+}
+\RequirePackage{etoolbox}%List management
+\RequirePackage{xpatch} %To patch commands easily in HTML mode
+\RequirePackage{array} %For formatting tables in the LaTeX mode of Clozes
+\RequirePackage{ifplatform} % To choose Ghostscript commands
\@ifundefined{ifpdf}{\RequirePackage{ifpdf}}{}% old iftex would not define the conditional
\RequirePackage{shellesc} %Luatex-compatible way of getting system access
\RequirePackage{fancybox} %For fancy LaTeX tags
@@ -1802,7 +1979,7 @@
\fi
\writetomoodle{<!-- \moodle@stamp -->}%
\def\moodle@stamp{running on \platformname}%
- \g@addto@macro{\moodle@stamp}{ with the package moodle v0.8 }%
+ \g@addto@macro{\moodle@stamp}{ with the package moodle v0.9 }%
\writetomoodle{<!-- \moodle@stamp -->}%
\fi
\immediate\write\moodle@outfile{}%
@@ -1867,13 +2044,14 @@
}{}%
}}%
\newcommand*\@enumeratename{enumerate}%
+\newdimen\moodle@totalmarks \moodle@totalmarks=0pt%
\newenvironment{quiz}[2][]{%
\setkeys{moodle}{#1}%
\gdef\setcategory##1{%
% At first call (end of \begin{quiz}) enumerate is not started yet
\ifx\@currenvir\@enumeratename
% In case no question is defined between two calls of \setcategory
- \def\@noitemerr{\@latex@warning{Empty question list}}%
+ \def\@noitemerr{}%\@latex@warning{Empty question list}
\end{enumerate}%
\fi
\gdef\moodle@currentcategory{##1}%
@@ -1894,7 +2072,7 @@
\begin{enumerate}%
}%
\gdef\setsubcategory##1{%
- \def\@noitemerr{\@latex@warning{Empty question list}}%
+ \def\@noitemerr{}%\@latex@warning{Empty question list}
\end{enumerate}%
\moodle@write@category@xml{\moodle@currentcategory/##1}%
\ifmoodle@section
@@ -1915,6 +2093,7 @@
\setcategory{#2}%
}{%
\end{enumerate}%
+ \emph{Total of marks: \strip@pt\moodle@totalmarks}%
\let\setcategory\relax
\let\setsubcategory\relax
}%
@@ -2053,21 +2232,29 @@
}%
}%
-\def\generate@moodle@write@tags#1{%
- % #1 = NAME for \moodle@writeNAME
- % #3 = what, exactly, to write
- \xa\gdef\csname moodle@writetags\endcsname{%
- %\xa\xa\xdef\xa\xa\ds\xa\xa{Encountered '\string #1'}\show\ds
- \xa\xdef\xa\test@iii\xa{\moodle@tags}%
- \ifx\test@iii\@moodle@empty\relax\else
- \xa\converttohtmlmacro\xa\moodle@htmltowrite\xa{\moodle@tags}%
- \writetomoodle[2]{ <tags>}%
+\def\moodle@writetags{%
+ \xa\xdef\xa\test@iii\xa{\moodle@tags}%
+ \ifx\test@iii\@moodle@empty\relax\else
+ \writetomoodle[2]{ <tags>}%
+ \renewcommand*{\do}[1]{%
+ \def\moodle@tagtext{##1}%
+ \xa\converttohtmlmacro\xa\moodle@htmltowrite\xa{\moodle@tagtext}%
\writetomoodle[4]{ <tag><text><![CDATA[\moodle@htmltowrite]]></text></tag>}%
- \writetomoodle[2]{ </tags>}%
- \fi
- }%
+ }
+ \xa\docsvlist\xa{\moodle@tags}%
+ \writetomoodle[2]{ </tags>}%
+ \fi
+}%
+\newif\ifmoodle@firsttag
+\moodle@firsttagtrue
+\def\moodle@latex@writetags{%
+ \xa\xdef\xa\test@iii\xa{\moodle@tags}%
+ \ifx\test@iii\@moodle@empty\relax\else
+ \hfill tags: %
+ \renewcommand*{\do}[1]{\ifmoodle@firsttag\moodle@firsttagfalse\else, \fi\texttt{##1}}%
+ \xa\docsvlist\xa{\test@iii}%
+ \fi
}%
-
% \end{macrocode}
% \subsubsection{Keys for all question types}
% \begin{macrocode}
@@ -2142,9 +2329,7 @@
%which defines a "tag" (i.e., keyword) for the question.
%Key calls like [tags={random}] set \moodle@tags.
\define@cmdkey{moodle}[moodle@]{tags}[]{}%
- \generate@moodle@write@tags{\csname moodle@tags\endcsname}%
- \moodleset{tags}%
-% TODO: handle multiple 'tags' for one question
+ \moodleset{tags={}}%
% \end{macrocode}
% \subsubsection{Keys for all answers}
@@ -2175,6 +2360,11 @@
\generate@moodle@write@code*{shuffle}<shuffleanswers>{\ifmoodle@shuffle 1\else 0\fi}%
\moodleset{shuffle=true}%
+%% ALLORNOTHING -- for multichoice with multiple answers where all the points are given
+% if and only if all the correct answers are selected.
+ \define@boolkey{moodle}[moodle@]{allornothing}[true]{}%
+ \moodleset{allornothing=false}%
+
%% TODO: CORRECTFEEDBACK
%% TODO: PARTIALLYCORRECTFEEDBACK
%% TODO: INCORRECTFEEDBACK
@@ -2491,6 +2681,7 @@
\NewEnviron{#1}[2][]{%
\bgroup
\setkeys{moodle}{##1,questionname={##2}}%
+ \global\advance\moodle@totalmarks by \csname moodle@default grade\endcsname pt
\expandafter\gatheritems\xa{\BODY}%
\let\moodle@questionheader=\gatheredheader
%First, the LaTeX processing
@@ -2498,10 +2689,7 @@
\ifmoodle@handout
\moodle@makelatextag@qtype{#1}
\else
- \xa\xdef\xa\test@iii\xa{\moodle@tags}%
- \ifx\test@iii\@moodle@empty\relax\else
- \hfill tags: \texttt{\moodle@tags}
- \fi
+ \moodle@latex@writetags
\par
\noindent
\moodle@makelatextag@qtype{#1}
@@ -2540,41 +2728,41 @@
% Description blocks can be empty. In this case, nothing is done.
%
% \begin{macrocode}
-\let\description\relax% remove the meaning of existing \description and \enddescription
-\let\enddescription\relax
-\NewEnviron{description}[2][]{%
- \bgroup
- \setkeys{moodle}{#1,questionname={#2}}%
- \let\moodle@questiontext=\BODY
- \trim@spaces@in\moodle@questiontext
- \ifx\moodle@questiontext\@empty\relax\else%
- %First, the LaTeX processing.
- \item \textbf{\moodle@questionname}
- \ifmoodle@handout\else
- \xa\xdef\xa\test@iii\xa{\moodle@tags}%
- \ifx\test@iii\@moodle@empty\relax\else
- \hfill tags: \texttt{\moodle@tags}%
+\AfterEndPreamble{% in case something like \usepackage[french]{babel} is loaded
+ \let\description\relax% remove the meaning of existing \description and \enddescription
+ \let\enddescription\relax
+
+ \NewEnviron{description}[2][]{%
+ \bgroup
+ \setkeys{moodle}{#1,questionname={#2}}%
+ \let\moodle@questiontext=\BODY
+ \trim@spaces@in\moodle@questiontext
+ \ifx\moodle@questiontext\@empty\relax\else%
+ %First, the LaTeX processing.
+ \item \textbf{\moodle@questionname}
+ \ifmoodle@handout\else
+ \moodle@latex@writetags
+ \par
+ \noindent
\fi
- \par
+ \moodle@makelatextag@qtype{description}\par
\noindent
- \fi
- \moodle@makelatextag@qtype{description}\par
- \noindent
- \moodle@questiontext\par
- \ifmoodle@handout\else
- \ifx\moodle@feedback\@empty\relax\else
- \fbox{\parbox{\linewidth}{\emph{\moodle@feedback}}}%
+ \moodle@questiontext\par
+ \ifmoodle@handout\else
+ \ifx\moodle@feedback\@empty\relax\else
+ \fbox{\parbox{\linewidth}{\emph{\moodle@feedback}}}%
+ \fi
\fi
+ %Now, writing information to memory.
+ \@moodle@ifgeneratexml{%
+ \writetomoodle{<question type="description">}%
+ \moodle@writecommondata
+ \moodle@writetags%
+ \writetomoodle{</question>}%
+ }{}%
\fi
- %Now, writing information to memory.
- \@moodle@ifgeneratexml{%
- \writetomoodle{<question type="description">}%
- \moodle@writecommondata
- \moodle@writetags%
- \writetomoodle{</question>}%
- }{}%
- \fi
- \egroup
+ \egroup
+ }%
}%
% \end{macrocode}
%
@@ -2587,7 +2775,6 @@
% Moodle cannot automatically grade an essay,
% but if the user puts \item's in, we can list them in an itemize as notes.
\par\noindent \emph{Notes for grader:}
- \moodle@questionheader
\ifnum\c@numgathereditems>0\relax
\begin{itemize} \setlength\itemsep{0pt}\setlength\parskip{0pt}%
\loopthroughitemswithcommand{\moodle@print@essay@answer}%
@@ -2601,6 +2788,8 @@
\NewEnviron{essay}[2][]{%
\bgroup
\setkeys{moodle}{#1,questionname={#2}}%
+ \global\advance\moodle@totalmarks by \csname moodle@default grade\endcsname pt
+ \moodle@checkresponsefieldlines
\expandafter\gatheritems\expandafter{\BODY}%
\let\moodle@questionheader=\gatheredheader
%First, the LaTeX processing.
@@ -2608,10 +2797,7 @@
\ifmoodle@handout
\moodle@makelatextag@qtype{essay}
\else
- \xa\xdef\xa\test@iii\xa{\moodle@tags}%
- \ifx\test@iii\@moodle@empty\relax\else
- \hfill tags: \texttt{\moodle@tags}
- \fi
+ \moodle@latex@writetags
\par
\noindent
\moodle@makelatextag@qtype{essay}
@@ -2621,7 +2807,9 @@
\fi
\par
\noindent
- \ifx\moodle@responsetemplate\@empty\relax\else%
+ \moodle@questionheader
+ \long\def\@lempty{}%
+ \ifx\moodle@responsetemplate\@lempty\else
\par\noindent \emph{Template:}
\par\fbox{\parbox{\linewidth}{\moodle@responsetemplate}}\par
\fi
@@ -2660,6 +2848,31 @@
\egroup
}%
+\def\moodle@checkresponsefieldlines{%
+ \newcount\a\a=\number\csname moodle@response field lines\endcsname
+ \newcount\b\b=5%
+ \ifnum\the\a>40% if the value was more than 40
+ \a=40%
+ \fi
+ \ifnum\the\a<5% if the value was less than 5
+ \a=5%
+ \fi
+ \divide\a by\b% integer division by 5
+ \multiply\a by\b% multiply by 5
+ \ifnum\a=\csname moodle@response field lines\endcsname% equality holds if we had 5, 10, 15, 20, 25, 30, or 40
+ \else
+ \ifnum\csname moodle@response field lines\endcsname>5%
+ \ifnum\csname moodle@response field lines\endcsname<40%
+ \advance\a by\b% approximate with the next multiple of 5
+ \fi
+ \fi
+ \PackageWarning{moodle}{"response field lines" admits only multiples of 5 between 5 and 40
+ (You tried to set \csname moodle@response field lines\endcsname). The value
+ \the\a\space will be used.}%
+ \setkeys{moodle}{response field lines=\the\a}%
+ \fi
+}%
+
%%%% TODO
%%%% To make essay work will be tough.
%%%% Every line from \ifnum\c@numgathereditems=0\relax through its \else and \fi,
@@ -2704,12 +2917,12 @@
\moodle@writeattachmentsrequired%
}%
-\def\moodle@print@essay@answer#1{%
+\long\def\moodle@print@essay@answer#1{%
\item #1%
}%
-\def\moodle@savegraderinfo#1{%
+\long\def\moodle@savegraderinfo#1{%
%\def\ds{#1}\show\ds
\bgroup
\moodle@savegraderinfo@int#1\moodle@answer@rdelim
@@ -2720,7 +2933,7 @@
\setkeys{moodle}{fraction=0,#1}%
\moodle@savegraderinfo@int@int%
}%
-\def\moodle@savegraderinfo@int@int#1\moodle@answer@rdelim{%
+\long\def\moodle@savegraderinfo@int@int#1\moodle@answer@rdelim{%
\def\moodle@answertext{#1}
\xa\converttohtmlmacro\xa\moodle@answertext@html\xa{\moodle@answertext}%
%\trim@spaces@in\moodle@answertext
@@ -2830,7 +3043,8 @@
\trim@spaces@in\moodle@answertext
\moodle@checkfraction
\addto@xml[2]{\moodle@answers@xml}{<answer fraction="\moodle@fraction" format="plain_text">}%
- \addto@xml[4]{\moodle@answers@xml}{ <text>\moodle@answertext</text>}%
+ \xa\converttohtmlmacro\xa\moodle@answertext@html\xa{\moodle@answertext}%
+ \addto@xml[4]{\moodle@answers@xml}{ <text>\moodle@answertext@html</text>}%
\ifx\moodle@feedback\@empty\relax\else
\trim@spaces@in\moodle@feedback
\xa\converttohtmlmacro\xa\moodle@feedback@html\xa{\moodle@feedback}%
@@ -2956,10 +3170,19 @@
% LATEX PROCESSING
\def\moodle@makelatextag@multi{%
- \ifmoodle@multiple
- \moodle@makelatextagbox{Multiple}\relax%
+ \ifmoodle@allornothing
+ \ifx\endmulti\endclozemulti
+ \PackageError{moodle}{Unsupported option "allornothing" for a multichoice subquestion}
+ {Please set "allornothing=false"}%
+ \else
+ \moodle@makelatextagbox{All-or-nothing}%
+ \fi
\else
- \moodle@makelatextagbox{Single}\relax%
+ \ifmoodle@multiple
+ \moodle@makelatextagbox{Multiple}%
+ \else
+ \moodle@makelatextagbox{Single}%
+ \fi
\fi
\ifmoodle@handout\else
\ifmoodle@shuffle
@@ -2969,6 +3192,9 @@
}
\def\moodle@multi@latexprocessing{%
+ \ifmoodle@allornothing
+ \moodle@singletrue
+ \fi
\moodle@countcorrectanswers%
\ifmoodle@handout\NewList{answerlist}\fi
\begin{enumerate}\moodle@obeynumberingstyle%
@@ -2990,7 +3216,7 @@
\fi
\fi
}
- \def\moodle@print@multichoice@answer#1{%
+ \long\def\moodle@print@multichoice@answer#1{%
\let\moodle@feedback=\@empty%
\moodle@print@multichoice@answer@int#1 \@rdelim%
}%
@@ -2999,7 +3225,7 @@
\setkeys{moodle}{#1}%
\moodle@print@multichoice@answer@int@int%
}%
- \def\moodle@print@multichoice@answer@int@int#1#2\@rdelim{%
+ \long\def\moodle@print@multichoice@answer@int@int#1#2\@rdelim{%
\def\test@i{#1}%
\def\test@ii{#2}%
\def\moodle@answertext{\item }%
@@ -3020,11 +3246,11 @@
\ifx\moodle@fraction\@empty\relax%
\setkeys{moodle}{fraction=0}%
\fi
+ \moodle@checkfraction
\ifx\moodle@fraction\@hundred%
\trim@spaces@in\moodle@answertext%
\g@addto@macro\moodle@answertext{$~\checkmark$}%
\else
- \moodle@checkfraction
\ifdim0pt=\moodle@fraction pt\relax\else%
\g@addto@macro\moodle@answertext{$~(\moodle@fraction\%)$}%
\fi
@@ -3101,7 +3327,7 @@
\fi
\gdef\moodle@autosanctions{\strip@pt\moodle@pointsperincorrect}%
}
- \def\moodle@countcorrectanswers@a#1{%
+ \long\def\moodle@countcorrectanswers@a#1{%
%The grouping is to keep key answer-specific key changes local.
\bgroup
\moodle@countcorrectanswers@b#1\moodle@answer@rdelim
@@ -3114,7 +3340,7 @@
\moodle@countcorrectanswers@c%
%\fi
}%
- \def\moodle@countcorrectanswers@c#1#2\moodle@answer@rdelim{%
+ \long\def\moodle@countcorrectanswers@c#1#2\moodle@answer@rdelim{%
\def\test@i{#1}%
\ifx\test@i\@star
\stepcounter{moodle@numcorrectanswers}%
@@ -3150,7 +3376,15 @@
\fi
\fi
}
- \def\moodle@checkfraction{%
+ \def\moodle@checkfraction{%
+ \ifmoodle@allornothing
+ \ifnum\moodle@fraction>0%
+ \setkeys{moodle}{fraction=100}%
+ \fi
+ \ifnum\moodle@fraction<0%
+ \setkeys{moodle}{fraction=0}%
+ \fi
+ \else
%\def\test@i{#1}%
\setlength{\test@fraction}{\moodle@fraction pt}%
% take the absolute value
@@ -3168,11 +3402,12 @@
\else
\setkeys{moodle}{fraction=\test@fractionmatched}%
\fi
- }
+ \fi
+ }
% TODO: Put these macros in same order as other sections'.
% SAVING ANSWERS TO MEMORY
-\def\savemultianswer#1{%
+\long\def\savemultianswer#1{%
\bgroup
\savemultianswer@int#1 \moodle@answer@rdelim
\passvalueaftergroup{\moodle@answers@xml}%
@@ -3181,9 +3416,12 @@
\newcommand\savemultianswer@int[1][]{%
\let\moodle@fraction\@empty%
\setkeys{moodle}{#1}%
+ \ifmoodle@allornothing
+ \moodle@singletrue
+ \fi
\savemultianswer@int@int%
}%
- \def\savemultianswer@int@int#1#2\moodle@answer@rdelim{%
+ \long\def\savemultianswer@int@int#1#2\moodle@answer@rdelim{%
\def\test@i{#1}%
\ifx\test@i\@star
\ifmoodle@single
@@ -3218,9 +3456,12 @@
% WRITING QUESTION TO XML FILE
\gdef\writemultiquestion{%
- \writetomoodle{<question type="multichoice">}%
+
+ \writetomoodle{<question type="multichoice\ifmoodle@allornothing set\fi">}%
\moodle@writecommondata%
- \moodle@writesingle%
+ \ifmoodle@allornothing\else
+ \moodle@writesingle%
+ \fi
\moodle@writeshuffle%
\moodle@writeanswernumbering%
}%
@@ -3241,6 +3482,7 @@
\NewEnviron{truefalse}[2][]{%
\bgroup
\setkeys{moodle}{#1,questionname={#2}}%
+ \global\advance\moodle@totalmarks by \csname moodle@default grade\endcsname pt
\expandafter\gatheritems\xa{\BODY}%
\let\moodle@questionheader=\gatheredheader
%First, the LaTeX processing
@@ -3248,10 +3490,7 @@
\ifmoodle@handout
\moodle@makelatextag@qtype{truefalse}
\else
- \xa\xdef\xa\test@iii\xa{\moodle@tags}%
- \ifx\test@iii\@moodle@empty\relax\else
- \hfill tags: \texttt{\moodle@tags}
- \fi
+ \moodle@latex@writetags
\par
\noindent
\moodle@makelatextag@qtype{truefalse}
@@ -3494,10 +3733,10 @@
\setcounter{moodle@numcorrectanswers}{0}% Here this counter is for "questions" (items on the left column)
\loopthroughitemswithcommand{\moodle@print@matching@answer}%
\ifnum\c@numgathereditems<3%
- \PackageWarning{moodle}{Moodle expects at least three "answers" with matching type}
+ \PackageWarning{moodle}{Moodle expects at least three "answers" with matching type}%
\fi
\ifnum\c@moodle@numcorrectanswers<2%
- \PackageWarning{moodle}{Moodle expects at least two "questions" with the matching type}
+ \PackageWarning{moodle}{Moodle expects at least two "questions" with the matching type}%
\fi
\ifmoodle@handout
\ifmoodle@shuffle
@@ -3645,14 +3884,10 @@
\ifmoodle@handout
\moodle@makelatextag@qtype{cloze}
\else
- \xa\xdef\xa\test@iii\xa{\moodle@tags}%
- \ifx\test@iii\@moodle@empty\relax\else
- \hfill tags: \texttt{\moodle@tags}
- \fi
+ \moodle@latex@writetags
\par
\noindent
\moodle@makelatextag@qtype{cloze}
- \moodle@makelatextag@value{default grade}{\moodle@marks{\csname moodle@default grade\endcsname}}
\moodle@makelatextag@value{penalty}{penalty}
\fi
\par
@@ -3685,7 +3920,11 @@
% WRITING QUESTION TO XML FILE
\gdef\writeclozequestion{%
\writetomoodle{<question type="cloze">}%
- \moodle@writecommondata%
+ \moodle@writequestionname%
+ \moodle@writequestiontext%
+ \moodle@writegeneralfeedback%
+ \moodle@writepenalty%
+ \moodle@writehidden%
\moodle@writetags%
\writetomoodle{</question>}%
}%
@@ -3746,6 +3985,7 @@
\def\endclozemulti@code{\htmlize@patchendenvironment}%
\else
%LaTeX version
+ \global\advance\moodle@totalmarks by \csname moodle@default grade\endcsname pt
\moodle@questionheader% %Any introductory text just continues to be typeset.
\par
\noindent
@@ -3800,7 +4040,7 @@
}[\endclozemulti@code]%
-\def\moodle@print@clozemultichoice@answer#1{%
+\long\def\moodle@print@clozemultichoice@answer#1{%
\let\moodle@feedback=\@empty
\moodle@print@clozemultichoice@answer@int#1 \@rdelim%
}%
@@ -3808,7 +4048,7 @@
\setkeys{moodle}{fraction=0,#1}%
\moodle@print@clozemultichoice@answer@int@int%
}%
-\def\moodle@print@clozemultichoice@answer@int@int#1#2\@rdelim{%
+\long\def\moodle@print@clozemultichoice@answer@int@int#1#2\@rdelim{%
\def\moodle@answertext{}%
% Case 0: "(answer) \\ \hline"
% Case 1: "\item (answer)"
@@ -3867,7 +4107,7 @@
\fi
}%
-\def\saveclozemultichoiceanswer#1{%
+\long\def\saveclozemultichoiceanswer#1{%
\bgroup
\saveclozemultichoiceanswer@int#1 \moodle@answer@rdelim
\egroup
@@ -3876,7 +4116,7 @@
\setkeys{moodle}{fraction=0,#1}%
\saveclozemultichoiceanswer@int@int%
}%
-\def\saveclozemultichoiceanswer@int@int#1#2\moodle@answer@rdelim{%
+\long\def\saveclozemultichoiceanswer@int@int#1#2\moodle@answer@rdelim{%
\def\test@i{#1}%
\ifgatherbeginningofloop\else
\xa\gdef\xa\clozemulti@coding\xa{\clozemulti@coding\clozetilde}% separator between answers
@@ -3929,6 +4169,7 @@
\def\endclozenumerical@code{\htmlize@patchendenvironment}%
\else
%LaTeX version
+ \global\advance\moodle@totalmarks by \csname moodle@default grade\endcsname pt
\moodle@questionheader% %Any introductory text just continues to be typeset.
\par
\noindent
@@ -4058,6 +4299,7 @@
\def\endclozeshortanswer@code{\htmlize@patchendenvironment}%
\else
%LaTeX version
+ \global\advance\moodle@totalmarks by \csname moodle@default grade\endcsname pt
\moodle@questionheader% %Any introductory text just continues to be typeset.
\par
\noindent
@@ -4358,6 +4600,7 @@
\def\@lt{<}%
\def\@gt{>}%
+\def\@dash{-}%
\long\def\htmlize@recursive@i#1#2#3\htmlize@rdelim@i{%
% #1#2#3 is a sequence of tokens. All should be categories 11 (letter) or 12 (other).
@@ -4568,11 +4811,12 @@
\fi% \ifx\test@ii\@lsinglequote%
\else
\ifx\test@i\@rsinglequote%
- \ifx\test@ii\@rsinglequote%
- %Double right quote
- \g@addto@macro\htmlize@output{\otherampersand rdquo;}%
+ \ifx\test@ii\@rsinglequote% Double right quote
+ %AAedit 2021.01.06: in math mode, you should write 2 single right quotes, for second derivatives
+ \moodle@ifmathmode{\g@addto@macro\htmlize@output{\otherampersand rsquo;\otherampersand rsquo;}}%
+ {\g@addto@macro\htmlize@output{\otherampersand rdquo;}}%
\def\htmlize@next@i{\htmlize@recursive@i#3\htmlize@rdelim@i}%
- \else
+ \else% Single right quote
\g@addto@macro\htmlize@output{\otherampersand rsquo;}%
\def\htmlize@next@i{\htmlize@recursive@i#2#3\htmlize@rdelim@i}%
\fi% \ifx\test@ii\@rsinglequote%
@@ -4591,9 +4835,20 @@
{\g@addto@macro\htmlize@output{>}}%
\def\htmlize@next@i{\htmlize@recursive@i#2#3\htmlize@rdelim@i}%
\else
- % Default case: write first token to output, call self on remaining tokens.
- \g@addto@macro\htmlize@output{#1}%
- \def\htmlize@next@i{\htmlize@recursive@i#2#3\htmlize@rdelim@i}%
+ \ifx\test@i\@dash
+ \ifx\test@ii\@dash% en-dash (--)
+ \moodle@ifmathmode{\g@addto@macro\htmlize@output{--}}%
+ {\g@addto@macro\htmlize@output{\otherampersand ndash;}}%
+ \def\htmlize@next@i{\htmlize@recursive@i#3\htmlize@rdelim@i}%
+ \else
+ \g@addto@macro\htmlize@output{-}%
+ \def\htmlize@next@i{\htmlize@recursive@i#2#3\htmlize@rdelim@i}%
+ \fi
+ \else
+ % Default case: write first token to output, call self on remaining tokens.
+ \g@addto@macro\htmlize@output{#1}%
+ \def\htmlize@next@i{\htmlize@recursive@i#2#3\htmlize@rdelim@i}%
+ \fi% \ifx\test@i\@dash
\fi% \ifx\test@i\@gt
\fi% \ifx\test@i\@lt
\fi% \ifx\test@i\@doublequote
@@ -4927,6 +5182,7 @@
\htmlize@record@action{\endclozemode}%
\htmlize@record@action{\relax}%
+\html@action@def\%{\g@addto@macro\htmlize@output{\otherpercent}}%
\html@action@def\#{\g@addto@macro\htmlize@output{\otherhash}}%
\html@action@def\&{\g@addto@macro\htmlize@output{\otherampersand}}%
\html@action@def\\{\moodle@ifmathmode{\g@addto@macro\htmlize@output{\otherbackslash\otherbackslash}}%
@@ -4971,6 +5227,9 @@
\html@action@def\${%
\g@addto@macro\htmlize@output{\otherdollar}%
}%
+\html@action@def\@dquote{%
+ \g@addto@macro\htmlize@output{"}%
+ }%
\html@action@def\clozetilde{%
\xa\g@addto@macro\xa\htmlize@output\xa{\othertilde}%
}%
@@ -5138,25 +5397,48 @@
{\g@addto@macro\htmlize@output{\otherampersand#1caron\othersemicol}}%
{\xa\g@addto@macro\htmlize@output\xa{\string\v#1}}%
}%
+
+% Ogonek diacritics
+{\catcode`|=3\relax
+ \gdef\htmlize@ogonek{A|E|I|U|a|e|i|u|}}
+\html@action@def\k#1{%
+ \ifinlist{#1}{\htmlize@ogonek}%
+ {\g@addto@macro\htmlize@output{\otherampersand#1ogon\othersemicol}}%
+ {
+ \bgroup
+ \def\test@i{#1}%
+ \ifx\test@i\@O
+ \def\toadd{\otherampersand\otherhash490\othersemicol}%
+ \else
+ \ifx\test@i\@o
+ \def\toadd{\otherampersand\otherhash491\othersemicol}%
+ \else
+ \def\toadd{\otherbackslash\otherlbrace#1\otherrbrace}%
+ \fi
+ \fi
+ \xa\g@addto@macro\xa\htmlize@output\xa{\toadd}%
+ \egroup
+ }%
+}%
% \end{macrocode}
%
% \subsubsection{Command sequences for Expansion}
%
% \begin{macrocode}
-\html@def\underline#1{<SPAN STYLE=\&\#34;text-decoration: underline;\&\#34;>#1</SPAN>}
+\html@def\underline#1{<SPAN STYLE=\@dquote text-decoration: underline;\@dquote>#1</SPAN>}%
\html@def\emph#1{<EM>#1</EM>}%
\html@def\textit#1{<I>#1</I>}%
\html@def\textbf#1{<B>#1</B>}%
\html@def\texttt#1{<CODE>#1</CODE>}%
-\html@def\textsc#1{<SPAN STYLE=\&\#34;font-variant: small-caps;\&\#34;>#1</SPAN>}
-\html@def\url#1{<A href=\&\#34;#1\&\#34;>#1</A>}%
-\html@def\href#1#2{<A href=\&\#34;#1\&\#34;>#2</A>}%
+\html@def\textsc#1{<SPAN STYLE=\@dquote font-variant: small-caps;\@dquote>#1</SPAN>}%
+\html@def\url#1{<A href=\@dquote #1\@dquote>#1</A>}%
+\html@def\href#1#2{<A href=\@dquote #1\@dquote>#2</A>}%
\html@def\textsuperscript#1{<SUP>#1</SUP>}%
\html@def\up#1{<SUP>#1</SUP>}%
\html@def\fup#1{<SUP>#1</SUP>}%
\html@def\textsubscript#1{<SUB>#1</SUB>}%
\html@def\blank{____________}%
-\html@def\par{</P><P>}%
+\html@def\par{<BR/>}%
\html@def\aa{\&aring;}%
\html@def\AA{\&Aring;}%
\html@def\ae{\&aelig;}%
@@ -5176,6 +5458,15 @@
\html@def\guillemotleft{\&laquo;\&\#8239;}%
\html@def\fg{\&\#8239;\&raquo;}%
\html@def\guillemotright{\&\#8239;\&raquo;}%
+\html@def\glqq{\&bdquo;}%
+\html@def\grqq{\&ldquo;}%
+\html@def\glq{\&sbquo;}%
+\html@def\grq{\&lsquo;}%
+\html@def\flqq{\&laquo;\&\#8239;}%
+\html@def\frqq{\&\#8239;\&raquo;}%
+\html@def\flq{\&lsaquo;}%
+\html@def\frq{\&rsaquo;}%
+\html@def\dq{\&quot;}%
\html@def\,{\&\#8239;}%
\html@def\thinspace{\&\#8239;}%
\html@def\textbackslash{\&\#92;}%
@@ -5191,7 +5482,21 @@
\htmlize@record@action\displaymathrightdelim
% \end{macrocode}
-%
+%
+% \subsubsection{Passing Code to XML Only}
+% Users may want to include pieces of HTML code to the XML file only.
+% When producing the traditional output, the optional argument, empty
+% by default, is used.
+% \begin{macrocode}
+\newcommand\htmlonly[2][]{#1}%
+% \end{macrocode}
+% When producing the XML file, the mandatory argument is passed as-is.
+% \begin{macrocode}
+\html@action@newcommand{htmlonly}[2][]{%
+ \g@addto@macro\htmlize@output{#2}%
+}%
+% \end{macrocode}
+%
% \subsection{Graphics via {\ttfamily\string\includegraphics}}
%
% \subsubsection{Finding Media Files}
@@ -5206,6 +5511,14 @@
% are set with the basename, including path, and extension, respectively.
%
% \begin{macrocode}
+\AtEndPreamble{%
+ \@ifpackageloaded{graphics}{%
+ \@ifpackagelater{graphics}{2019/10/08}{}{%
+ \PackageError{moodle}{`moodle' is made to interact with the `graphics'
+ package not older than 2019/10/08.}%
+ }%
+ }{}%
+}%
\def\moodle@media@find#1{%
\ifx\detokenize\@undefined\else
\edef\Gin@extensions{\detokenize\expandafter{\Gin@extensions}}%
@@ -5382,7 +5695,10 @@
% While the picture will be animated after Moodle import, it will not be in the PDF
% output, whatever the viewer is.
\DeclareGraphicsAlien{.gif}{.png}{\htmlize@imagemagick@convert\otherspace '\SourceFile[0]' \OutputFile}%
- }{}%
+ }{
+ \newcommand\includegraphics[2][]{\PackageError{moodle}{"\string\includegraphics" is not defined}%
+ {Add "\string\usepackage{graphicx}" to you preamble.}}{}%}%
+ }%
}%
% \end{macrocode}
% \subsubsection{Graphics key-handling}
@@ -5434,25 +5750,30 @@
\SVGtoPDF\otherspace '\SourceFile' -o '\OutputFile' 2>/dev/null}%
}%
\fi
-
-\ifmoodle@tikz
-\AfterEndPreamble{%
- %\htmlize@record@expand{\embedaspict}%
- \let\oldincludegraphics=\includegraphics
- % patching includegraphics to trigger externalization
- \renewcommand{\includegraphics}[2][]{%
- %\message{moodle.sty: Processing \string\includegraphics[#1]{#2} for HTML^^J}%
- \tikz{\node[inner sep=0pt]{\oldincludegraphics[#1]{#2}};}%
- }%
- % externalized images must be included with the regular command
- \pgfkeys{/pgf/images/include external/.code={\oldincludegraphics{#1}}}%
- \html@action@newcommand{includegraphics}[2][]{%
- \message{moodle.sty: Processing \string\includegraphics[#1]{#2} ^^J}
- \global\advance\numpicturesread by 1\relax
- \edef\htmlize@imagetag{<IMG SRC="data:\TikzExportMIME;base64,\csname picbaselxiv@\the\numpicturesread\endcsname">}%
- \xa\g@addto@macro\xa\htmlize@output\xa{\htmlize@imagetag}%
+\def\moodle@checkconversionsuccess#1#2{%
+ \IfFileExists{#1}{}{%
+ \PackageError{moodle}{#2 failed}%
+ {If the XML file is not of importance to you: use package option "draft"}%
}%
}%
+\ifmoodle@tikz
+ \AfterEndPreamble{%
+ %\htmlize@record@expand{\embedaspict}%
+ \let\oldincludegraphics=\includegraphics
+ % patching includegraphics to trigger externalization
+ \renewcommand{\includegraphics}[2][]{%
+ %\message{moodle.sty: Processing \string\includegraphics[#1]{#2} for HTML^^J}%
+ \tikz{\node[inner sep=0pt]{\oldincludegraphics[#1]{#2}};}%
+ }%
+ % externalized images must be included with the regular command
+ \pgfkeys{/pgf/images/include external/.code={\oldincludegraphics{#1}}}%
+ \html@action@newcommand{includegraphics}[2][]{%
+ \message{moodle.sty: Processing \string\includegraphics[#1]{#2} ^^J}
+ \global\advance\numpicturesread by 1\relax
+ \edef\htmlize@imagetag{<IMG SRC="data:\TikzExportMIME;base64,\csname picbaselxiv@\the\numpicturesread\endcsname">}%
+ \xa\g@addto@macro\xa\htmlize@output\xa{\htmlize@imagetag}%
+ }%
+ }%
\else
\html@action@newcommand{includegraphics}[2][]{%
\bgroup% The grouping is to localize the changes caused by \setkeys.
@@ -5502,6 +5823,7 @@
\edef\cmdline{\PDFtoSVG\otherspace "\moodle@media@base\moodle@media@ext" -o "\moodle@media@base\moodle@media@ext@current" 2>/dev/null}%
\message{moodle.sty: Converting '#2' to SVG...^^J}%
\xa\ShellEscape\xa{\cmdline}%
+ \moodle@checkconversionsuccess{\moodle@media@base\moodle@media@ext@current}{PDFtoSVG conversion}%
%Next, optimize inline
\ifwindows\else
\edef\cmdline{\optiSVG < "\moodle@media@base\moodle@media@ext@current" >
@@ -5509,6 +5831,7 @@
"\moodle@media@base\moodle@media@ext@current"}%
\message{moodle.sty: Optimizing '\moodle@media@base\moodle@media@ext@current'...^^J}%
\xa\ShellEscape\xa{\cmdline}%
+ \moodle@checkconversionsuccess{\moodle@media@base\moodle@media@ext@current}{SVG optimization}%
\fi
\else% call ImageMagick
\def\moodle@media@ext@current{.png}%
@@ -5516,10 +5839,12 @@
\edef\cmdline{\htmlize@imagemagick@convert\otherspace "\moodle@media@base\moodle@media@ext" -resize \moodle@graphics@geometry\otherspace "\moodle@media@base\moodle@media@ext@current"}%
\message{moodle.sty: Converting '#2' to PNG...^^J}%
\xa\ShellEscape\xa{\cmdline}%
+ \moodle@checkconversionsuccess{\moodle@media@base\moodle@media@ext@current}{ImageMagick conversion}%
%Next, optimize inline
\edef\cmdline{\optipng\otherspace "\moodle@media@base\moodle@media@ext@current"}%
\message{moodle.sty: Optimizing '\moodle@media@base\moodle@media@ext@current'...^^J}%
\xa\ShellEscape\xa{\cmdline}%
+ \moodle@checkconversionsuccess{\moodle@media@base\moodle@media@ext@current}{PNG optimization}%
\fi
\fi
%Next, convert the file to base64 encoding
@@ -5546,27 +5871,25 @@
% \end{macrocode}
% This macro is in charge of throwing a system call to convert local files to base64.
% \begin{macrocode}
+\def\ConvertToBaseLXIV#1#2{%
+ \message{moodle.sty: Converting '#1#2' to base64...^^J}%
+ \ConvertToBaseLXIV@int{#1}{#2}
+ \xa\ShellEscape\xa{\cmdline}%
+ \moodle@checkconversionsuccess{#1.enc}{Base64 conversion}%
+}%
\ifwindows
- \def\ConvertToBaseLXIV#1#2{%
- \def\cmdline{\baselxiv\otherspace -encode "#1#2"\otherspace tmp.b64 && findstr /vbc:"---" tmp.b64 > "#1" && del tmp.b64"}%
- \message{moodle.sty: Converting '#1#2' to base64...^^J}%
- \xa\ShellEscape\xa{\cmdline}%
- % Starting from Windows 7, CertUtil is included by default. There should be no windows XP still running
- }%
+ \def\ConvertToBaseLXIV@int#1#2{%
+ \def\cmdline{\baselxiv\otherspace -encode "#1#2"\otherspace tmp.b64 && findstr /vbc:"---" tmp.b64 > "#1.enc" && del tmp.b64}%
+ }% Starting from Windows 7, CertUtil is included by default. There should be no windows XP still running
\else
\ifmacosx
- \def\ConvertToBaseLXIV#1#2{%
+ \def\ConvertToBaseLXIV@int#1#2{%
\def\cmdline{\baselxiv\otherspace -b 64 -i "#1#2"\otherspace -o "#1.enc"}%
- \message{moodle.sty: Converting '#1#2' to base64...^^J}%
- \xa\ShellEscape\xa{\cmdline}%
}%
\else % Linux, Cygwin
- \def\ConvertToBaseLXIV#1#2{%
+ \def\ConvertToBaseLXIV@int#1#2{%
\def\cmdline{\baselxiv\otherspace "#1#2"\otherspace > "#1.enc"}%
- \message{moodle.sty: Converting '#1#2' to base64...^^J}%
- \xa\ShellEscape\xa{\cmdline}%
- }%
- % base64 is part of coreutils, add "-w 64" to get exactly the previous behavior %
+ }% base64 is part of coreutils, add "-w 64" to get exactly the previous behavior %
\fi
\fi
% \end{macrocode}
@@ -5621,32 +5944,44 @@
\ifpdfoutput% tex engines defaulting to PDF output (pdflatex, xelatex, lualatex)
\def\ExportTikz{ \message{moodle.sty: Converting picture '\moodle@basename.pdf' to SVG...^^J}%
\edef\cmdline{\PDFtoSVG\otherspace "\moodle@basename.pdf" -o "\moodle@basename\TikzExportExtension" 2>/dev/null}%
- \xa\ShellEscape\xa{\cmdline}}%
+ \xa\ShellEscape\xa{\cmdline}%
+ \moodle@checkconversionsuccess{\moodle@basename\TikzExportExtension}{PDFtoSVG conversion}%
+ }%
\else % latex
\def\ExportTikz{ \message{moodle.sty: Converting picture '\moodle@basename.ps' to SVG...^^J}%
\edef\cmdline{\PDFtoSVG\otherspace "\moodle@basename.ps" -o "\moodle@basename\TikzExportExtension" 2>/dev/null}%
- \xa\ShellEscape\xa{\cmdline}}%
+ \xa\ShellEscape\xa{\cmdline}%
+ \moodle@checkconversionsuccess{\moodle@basename\TikzExportExtension}{PStoSVG conversion}%
+ }%
\fi
\def\OptimizeExport{ \message{moodle.sty: Optimizing '\moodle@basename.svg'...^^J}%
\edef\cmdline{\optiSVG\otherspace < "\moodle@basename\TikzExportExtension" >
"\moodle@basename.tmp.svg" && mv "\moodle@basename.tmp.svg"
"\moodle@basename\TikzExportExtension" }%
- \xa\ShellEscape\xa{\cmdline}}%
+ \xa\ShellEscape\xa{\cmdline}%
+ \moodle@checkconversionsuccess{\moodle@basename\TikzExportExtension}{SVG optimization}%
+ }%
\else
\def\TikzExportExtension{.png}%
\def\TikzExportMIME{image/png}%
\ifpdfoutput% tex engines defaulting to PDF output (pdflatex, xelatex, lualatex)
\def\ExportTikz{ \message{moodle.sty: Converting picture '\moodle@basename.pdf' to PNG...^^J}%
\edef\gscmdline{\gs\otherspace -sOutputFile=\moodle@basename\TikzExportExtension\otherspace -r150 \moodle@basename.pdf}%
- \xa\ShellEscape\xa{\gscmdline}}%
+ \xa\ShellEscape\xa{\gscmdline}%
+ \moodle@checkconversionsuccess{\moodle@basename\TikzExportExtension}{Ghostscript conversion}%
+ }%
\else % latex
\def\ExportTikz{ \message{moodle.sty: Converting picture '\moodle@basename.ps' to PNG...^^J}%
\edef\gscmdline{\gs\otherspace -sOutputFile=\moodle@basename\TikzExportExtension\otherspace -r150 \\moodle@basename.ps}%
- \xa\ShellEscape\xa{\gscmdline}}%
+ \xa\ShellEscape\xa{\gscmdline}%
+ \moodle@checkconversionsuccess{\moodle@basename\TikzExportExtension}{Ghostscript conversion}%
+ }%
\fi
\def\OptimizeExport{ \message{moodle.sty: Optimizing '\moodle@basename.png'...^^J}%
\edef\cmdline{\optipng\otherspace \moodle@basename\TikzExportExtension}%
- \xa\ShellEscape\xa{\cmdline}}%
+ \xa\ShellEscape\xa{\cmdline}%
+ \moodle@checkconversionsuccess{\moodle@basename\TikzExportExtension}{PNG optimization}%
+ }%
\fi
\let\moodle@oldtikzpicture=\tikzpicture
%The following code lets us run things *before* the normal \begin{tikzpicture}.
@@ -5678,6 +6013,7 @@
\ExportTikz
\OptimizeExport
\ConvertToBaseLXIV{\moodle@basename}{\TikzExportExtension}%
+ \IfFileExists{\moodle@basename.enc}{}{\PackageError{moodle}{Conversion failed}{Check your base64 conversion utiliy}}%
\message{moodle.sty: Reading base64 file '\tikzexternalrealjob-tikztemp-\the\numconvertedpictures.enc'...^^J}%
\savebaselxivdata
\message{moodle.sty: base64 data saved.^^J}%
@@ -6182,6 +6518,19 @@
% related to autospacing when using |pdfLaTeX|. We shall warn them.
% \begin{macrocode}
\AtBeginDocument{%
+ \def\moodle@babel@german@warn{\PackageWarning{moodle}{Be careful when using moodle
+ and German-related babel package options. The symbol " is made active and your umlauts
+ will confuse moodle. You can either 1) compile with xelatex/lualatex with UTF-8 coded
+ characters or 2) avoid the babel option.}
+ }
+ \@ifpackagewith{babel}{german}{\moodle@babel@german@warn}{\relax}%
+ \@ifpackagewith{babel}{austrian}{\moodle@babel@german@warn}{\relax}%
+ \@ifpackagewith{babel}{swissgerman}{\moodle@babel@german@warn}{\relax}%
+ \@ifpackagewith{babel}{swissgerman.toss}{\moodle@babel@german@warn}{\relax}%
+ \@ifpackagewith{babel}{ngerman}{\moodle@babel@german@warn}{\relax}%
+ \@ifpackagewith{babel}{naustrian}{\moodle@babel@german@warn}{\relax}%
+ \@ifpackagewith{babel}{nswissgerman}{\moodle@babel@german@warn}{\relax}%
+ \@ifpackagewith{babel}{nswissgerman.toss}{\moodle@babel@german@warn}{\relax}%
\ifPDFTeX % pdflatex or latex
\@ifpackagewith{babel}{french}{%
\PackageWarning{moodle}{Be careful when using LaTeX, moodle, and the babel package with option 'french'. Autospacing produces in undesired symbols in the XML. You can either 1) compile with xelatex/lualatex or 2) add '\NoAutoSpacing' after '\begin{quiz}'.}%
diff --git a/Master/texmf-dist/tex/latex/moodle/moodle.sty b/Master/texmf-dist/tex/latex/moodle/moodle.sty
index 3061bd3299d..6a69f146152 100644
--- a/Master/texmf-dist/tex/latex/moodle/moodle.sty
+++ b/Master/texmf-dist/tex/latex/moodle/moodle.sty
@@ -21,7 +21,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{moodle}
- [2021/01/04 v0.8 Moodle quiz XML generation]
+ [2021/02/07 v0.9 Moodle quiz XML generation]
\newif\ifmoodle@draftmode
\newif\ifmoodle@handout
\newif\ifmoodle@stampmode
@@ -58,12 +58,19 @@
\RequirePackage{environ} %To be able to take environment body as a macro argument
\RequirePackage{xkeyval} %For key-handling
\RequirePackage{amssymb} %For \checkmark symbol
-\RequirePackage{etex} %Expansion control, detokenization, etc.
+\@ifpackageloaded{iftex}{}{\RequirePackage{iftex}}
+\@ifundefined{ifeTeX}{% version of 'iftex' prior to November 2019.
+ \RequirePackage{etex}{}
+}{
+ \ifeTeX\else
+ \RequirePackage{etex}{} % Recent (2015+) TeX engines should be e-TeX.
+ %This is needed for expansion control, detokenization, etc.
+ \fi
+}
\RequirePackage{etoolbox}%List management
\RequirePackage{xpatch} %To patch commands easily in HTML mode
\RequirePackage{array} %For formatting tables in the LaTeX mode of Clozes
\RequirePackage{ifplatform} % To choose Ghostscript commands
-\@ifpackageloaded{iftex}{}{\RequirePackage{iftex}}
\@ifundefined{ifpdf}{\RequirePackage{ifpdf}}{}% old iftex would not define the conditional
\RequirePackage{shellesc} %Luatex-compatible way of getting system access
\RequirePackage{fancybox} %For fancy LaTeX tags
@@ -152,7 +159,7 @@
\fi
\writetomoodle{<!-- \moodle@stamp -->}%
\def\moodle@stamp{running on \platformname}%
- \g@addto@macro{\moodle@stamp}{ with the package moodle v0.8 }%
+ \g@addto@macro{\moodle@stamp}{ with the package moodle v0.9 }%
\writetomoodle{<!-- \moodle@stamp -->}%
\fi
\immediate\write\moodle@outfile{}%
@@ -200,13 +207,14 @@
}{}%
}}%
\newcommand*\@enumeratename{enumerate}%
+\newdimen\moodle@totalmarks \moodle@totalmarks=0pt%
\newenvironment{quiz}[2][]{%
\setkeys{moodle}{#1}%
\gdef\setcategory##1{%
% At first call (end of \begin{quiz}) enumerate is not started yet
\ifx\@currenvir\@enumeratename
% In case no question is defined between two calls of \setcategory
- \def\@noitemerr{\@latex@warning{Empty question list}}%
+ \def\@noitemerr{}%\@latex@warning{Empty question list}
\end{enumerate}%
\fi
\gdef\moodle@currentcategory{##1}%
@@ -227,7 +235,7 @@
\begin{enumerate}%
}%
\gdef\setsubcategory##1{%
- \def\@noitemerr{\@latex@warning{Empty question list}}%
+ \def\@noitemerr{}%\@latex@warning{Empty question list}
\end{enumerate}%
\moodle@write@category@xml{\moodle@currentcategory/##1}%
\ifmoodle@section
@@ -248,6 +256,7 @@
\setcategory{#2}%
}{%
\end{enumerate}%
+ \emph{Total of marks: \strip@pt\moodle@totalmarks}%
\let\setcategory\relax
\let\setsubcategory\relax
}%
@@ -327,21 +336,29 @@
}%
}%
-\def\generate@moodle@write@tags#1{%
- % #1 = NAME for \moodle@writeNAME
- % #3 = what, exactly, to write
- \xa\gdef\csname moodle@writetags\endcsname{%
- %\xa\xa\xdef\xa\xa\ds\xa\xa{Encountered '\string #1'}\show\ds
- \xa\xdef\xa\test@iii\xa{\moodle@tags}%
- \ifx\test@iii\@moodle@empty\relax\else
- \xa\converttohtmlmacro\xa\moodle@htmltowrite\xa{\moodle@tags}%
- \writetomoodle[2]{ <tags>}%
+\def\moodle@writetags{%
+ \xa\xdef\xa\test@iii\xa{\moodle@tags}%
+ \ifx\test@iii\@moodle@empty\relax\else
+ \writetomoodle[2]{ <tags>}%
+ \renewcommand*{\do}[1]{%
+ \def\moodle@tagtext{##1}%
+ \xa\converttohtmlmacro\xa\moodle@htmltowrite\xa{\moodle@tagtext}%
\writetomoodle[4]{ <tag><text><![CDATA[\moodle@htmltowrite]]></text></tag>}%
- \writetomoodle[2]{ </tags>}%
- \fi
- }%
+ }
+ \xa\docsvlist\xa{\moodle@tags}%
+ \writetomoodle[2]{ </tags>}%
+ \fi
+}%
+\newif\ifmoodle@firsttag
+\moodle@firsttagtrue
+\def\moodle@latex@writetags{%
+ \xa\xdef\xa\test@iii\xa{\moodle@tags}%
+ \ifx\test@iii\@moodle@empty\relax\else
+ \hfill tags: %
+ \renewcommand*{\do}[1]{\ifmoodle@firsttag\moodle@firsttagfalse\else, \fi\texttt{##1}}%
+ \xa\docsvlist\xa{\test@iii}%
+ \fi
}%
-
%% QUESTIONNAME
\define@cmdkey{moodle}[moodle@]{questionname}{}%
\generate@moodle@write@html@noptag{questionname}<name>{\moodle@questionname}%
@@ -407,8 +424,7 @@
%which defines a "tag" (i.e., keyword) for the question.
%Key calls like [tags={random}] set \moodle@tags.
\define@cmdkey{moodle}[moodle@]{tags}[]{}%
- \generate@moodle@write@tags{\csname moodle@tags\endcsname}%
- \moodleset{tags}%
+ \moodleset{tags={}}%
%% FRACTION -- how much this answer is worth out of 100 percent
\define@cmdkey{moodle}[moodle@]{fraction}[100]{}%
@@ -431,6 +447,10 @@
\generate@moodle@write@code*{shuffle}<shuffleanswers>{\ifmoodle@shuffle 1\else 0\fi}%
\moodleset{shuffle=true}%
+%% ALLORNOTHING -- for multichoice with multiple answers where all the points are given
+ \define@boolkey{moodle}[moodle@]{allornothing}[true]{}%
+ \moodleset{allornothing=false}%
+
%% TODO: CORRECTFEEDBACK
%% TODO: PARTIALLYCORRECTFEEDBACK
%% TODO: INCORRECTFEEDBACK
@@ -679,6 +699,7 @@
\NewEnviron{#1}[2][]{%
\bgroup
\setkeys{moodle}{##1,questionname={##2}}%
+ \global\advance\moodle@totalmarks by \csname moodle@default grade\endcsname pt
\expandafter\gatheritems\xa{\BODY}%
\let\moodle@questionheader=\gatheredheader
%First, the LaTeX processing
@@ -686,10 +707,7 @@
\ifmoodle@handout
\moodle@makelatextag@qtype{#1}
\else
- \xa\xdef\xa\test@iii\xa{\moodle@tags}%
- \ifx\test@iii\@moodle@empty\relax\else
- \hfill tags: \texttt{\moodle@tags}
- \fi
+ \moodle@latex@writetags
\par
\noindent
\moodle@makelatextag@qtype{#1}
@@ -718,47 +736,46 @@
\egroup
}%
}
-\let\description\relax% remove the meaning of existing \description and \enddescription
-\let\enddescription\relax
-\NewEnviron{description}[2][]{%
- \bgroup
- \setkeys{moodle}{#1,questionname={#2}}%
- \let\moodle@questiontext=\BODY
- \trim@spaces@in\moodle@questiontext
- \ifx\moodle@questiontext\@empty\relax\else%
- %First, the LaTeX processing.
- \item \textbf{\moodle@questionname}
- \ifmoodle@handout\else
- \xa\xdef\xa\test@iii\xa{\moodle@tags}%
- \ifx\test@iii\@moodle@empty\relax\else
- \hfill tags: \texttt{\moodle@tags}%
+\AfterEndPreamble{% in case something like \usepackage[french]{babel} is loaded
+ \let\description\relax% remove the meaning of existing \description and \enddescription
+ \let\enddescription\relax
+
+ \NewEnviron{description}[2][]{%
+ \bgroup
+ \setkeys{moodle}{#1,questionname={#2}}%
+ \let\moodle@questiontext=\BODY
+ \trim@spaces@in\moodle@questiontext
+ \ifx\moodle@questiontext\@empty\relax\else%
+ %First, the LaTeX processing.
+ \item \textbf{\moodle@questionname}
+ \ifmoodle@handout\else
+ \moodle@latex@writetags
+ \par
+ \noindent
\fi
- \par
+ \moodle@makelatextag@qtype{description}\par
\noindent
- \fi
- \moodle@makelatextag@qtype{description}\par
- \noindent
- \moodle@questiontext\par
- \ifmoodle@handout\else
- \ifx\moodle@feedback\@empty\relax\else
- \fbox{\parbox{\linewidth}{\emph{\moodle@feedback}}}%
+ \moodle@questiontext\par
+ \ifmoodle@handout\else
+ \ifx\moodle@feedback\@empty\relax\else
+ \fbox{\parbox{\linewidth}{\emph{\moodle@feedback}}}%
+ \fi
\fi
+ %Now, writing information to memory.
+ \@moodle@ifgeneratexml{%
+ \writetomoodle{<question type="description">}%
+ \moodle@writecommondata
+ \moodle@writetags%
+ \writetomoodle{</question>}%
+ }{}%
\fi
- %Now, writing information to memory.
- \@moodle@ifgeneratexml{%
- \writetomoodle{<question type="description">}%
- \moodle@writecommondata
- \moodle@writetags%
- \writetomoodle{</question>}%
- }{}%
- \fi
- \egroup
+ \egroup
+ }%
}%
\def\moodle@essay@latexprocessing{%
% Moodle cannot automatically grade an essay,
% but if the user puts \item's in, we can list them in an itemize as notes.
\par\noindent \emph{Notes for grader:}
- \moodle@questionheader
\ifnum\c@numgathereditems>0\relax
\begin{itemize} \setlength\itemsep{0pt}\setlength\parskip{0pt}%
\loopthroughitemswithcommand{\moodle@print@essay@answer}%
@@ -772,6 +789,8 @@
\NewEnviron{essay}[2][]{%
\bgroup
\setkeys{moodle}{#1,questionname={#2}}%
+ \global\advance\moodle@totalmarks by \csname moodle@default grade\endcsname pt
+ \moodle@checkresponsefieldlines
\expandafter\gatheritems\expandafter{\BODY}%
\let\moodle@questionheader=\gatheredheader
%First, the LaTeX processing.
@@ -779,10 +798,7 @@
\ifmoodle@handout
\moodle@makelatextag@qtype{essay}
\else
- \xa\xdef\xa\test@iii\xa{\moodle@tags}%
- \ifx\test@iii\@moodle@empty\relax\else
- \hfill tags: \texttt{\moodle@tags}
- \fi
+ \moodle@latex@writetags
\par
\noindent
\moodle@makelatextag@qtype{essay}
@@ -792,7 +808,9 @@
\fi
\par
\noindent
- \ifx\moodle@responsetemplate\@empty\relax\else%
+ \moodle@questionheader
+ \long\def\@lempty{}%
+ \ifx\moodle@responsetemplate\@lempty\else
\par\noindent \emph{Template:}
\par\fbox{\parbox{\linewidth}{\moodle@responsetemplate}}\par
\fi
@@ -831,6 +849,31 @@
\egroup
}%
+\def\moodle@checkresponsefieldlines{%
+ \newcount\a\a=\number\csname moodle@response field lines\endcsname
+ \newcount\b\b=5%
+ \ifnum\the\a>40% if the value was more than 40
+ \a=40%
+ \fi
+ \ifnum\the\a<5% if the value was less than 5
+ \a=5%
+ \fi
+ \divide\a by\b% integer division by 5
+ \multiply\a by\b% multiply by 5
+ \ifnum\a=\csname moodle@response field lines\endcsname% equality holds if we had 5, 10, 15, 20, 25, 30, or 40
+ \else
+ \ifnum\csname moodle@response field lines\endcsname>5%
+ \ifnum\csname moodle@response field lines\endcsname<40%
+ \advance\a by\b% approximate with the next multiple of 5
+ \fi
+ \fi
+ \PackageWarning{moodle}{"response field lines" admits only multiples of 5 between 5 and 40
+ (You tried to set \csname moodle@response field lines\endcsname). The value
+ \the\a\space will be used.}%
+ \setkeys{moodle}{response field lines=\the\a}%
+ \fi
+}%
+
%%%% TODO
%%%% To make essay work will be tough.
%%%% Every line from \ifnum\c@numgathereditems=0\relax through its \else and \fi,
@@ -875,11 +918,11 @@
\moodle@writeattachmentsrequired%
}%
-\def\moodle@print@essay@answer#1{%
+\long\def\moodle@print@essay@answer#1{%
\item #1%
}%
-\def\moodle@savegraderinfo#1{%
+\long\def\moodle@savegraderinfo#1{%
%\def\ds{#1}\show\ds
\bgroup
\moodle@savegraderinfo@int#1\moodle@answer@rdelim
@@ -890,7 +933,7 @@
\setkeys{moodle}{fraction=0,#1}%
\moodle@savegraderinfo@int@int%
}%
-\def\moodle@savegraderinfo@int@int#1\moodle@answer@rdelim{%
+\long\def\moodle@savegraderinfo@int@int#1\moodle@answer@rdelim{%
\def\moodle@answertext{#1}
\xa\converttohtmlmacro\xa\moodle@answertext@html\xa{\moodle@answertext}%
%\trim@spaces@in\moodle@answertext
@@ -962,7 +1005,8 @@
\trim@spaces@in\moodle@answertext
\moodle@checkfraction
\addto@xml[2]{\moodle@answers@xml}{<answer fraction="\moodle@fraction" format="plain_text">}%
- \addto@xml[4]{\moodle@answers@xml}{ <text>\moodle@answertext</text>}%
+ \xa\converttohtmlmacro\xa\moodle@answertext@html\xa{\moodle@answertext}%
+ \addto@xml[4]{\moodle@answers@xml}{ <text>\moodle@answertext@html</text>}%
\ifx\moodle@feedback\@empty\relax\else
\trim@spaces@in\moodle@feedback
\xa\converttohtmlmacro\xa\moodle@feedback@html\xa{\moodle@feedback}%
@@ -1065,10 +1109,19 @@
\def\moodle@makelatextag@multi{%
- \ifmoodle@multiple
- \moodle@makelatextagbox{Multiple}\relax%
+ \ifmoodle@allornothing
+ \ifx\endmulti\endclozemulti
+ \PackageError{moodle}{Unsupported option "allornothing" for a multichoice subquestion}
+ {Please set "allornothing=false"}%
+ \else
+ \moodle@makelatextagbox{All-or-nothing}%
+ \fi
\else
- \moodle@makelatextagbox{Single}\relax%
+ \ifmoodle@multiple
+ \moodle@makelatextagbox{Multiple}%
+ \else
+ \moodle@makelatextagbox{Single}%
+ \fi
\fi
\ifmoodle@handout\else
\ifmoodle@shuffle
@@ -1078,6 +1131,9 @@
}
\def\moodle@multi@latexprocessing{%
+ \ifmoodle@allornothing
+ \moodle@singletrue
+ \fi
\moodle@countcorrectanswers%
\ifmoodle@handout\NewList{answerlist}\fi
\begin{enumerate}\moodle@obeynumberingstyle%
@@ -1099,7 +1155,7 @@
\fi
\fi
}
- \def\moodle@print@multichoice@answer#1{%
+ \long\def\moodle@print@multichoice@answer#1{%
\let\moodle@feedback=\@empty%
\moodle@print@multichoice@answer@int#1 \@rdelim%
}%
@@ -1108,7 +1164,7 @@
\setkeys{moodle}{#1}%
\moodle@print@multichoice@answer@int@int%
}%
- \def\moodle@print@multichoice@answer@int@int#1#2\@rdelim{%
+ \long\def\moodle@print@multichoice@answer@int@int#1#2\@rdelim{%
\def\test@i{#1}%
\def\test@ii{#2}%
\def\moodle@answertext{\item }%
@@ -1129,11 +1185,11 @@
\ifx\moodle@fraction\@empty\relax%
\setkeys{moodle}{fraction=0}%
\fi
+ \moodle@checkfraction
\ifx\moodle@fraction\@hundred%
\trim@spaces@in\moodle@answertext%
\g@addto@macro\moodle@answertext{$~\checkmark$}%
\else
- \moodle@checkfraction
\ifdim0pt=\moodle@fraction pt\relax\else%
\g@addto@macro\moodle@answertext{$~(\moodle@fraction\%)$}%
\fi
@@ -1209,7 +1265,7 @@
\fi
\gdef\moodle@autosanctions{\strip@pt\moodle@pointsperincorrect}%
}
- \def\moodle@countcorrectanswers@a#1{%
+ \long\def\moodle@countcorrectanswers@a#1{%
%The grouping is to keep key answer-specific key changes local.
\bgroup
\moodle@countcorrectanswers@b#1\moodle@answer@rdelim
@@ -1222,7 +1278,7 @@
\moodle@countcorrectanswers@c%
%\fi
}%
- \def\moodle@countcorrectanswers@c#1#2\moodle@answer@rdelim{%
+ \long\def\moodle@countcorrectanswers@c#1#2\moodle@answer@rdelim{%
\def\test@i{#1}%
\ifx\test@i\@star
\stepcounter{moodle@numcorrectanswers}%
@@ -1258,7 +1314,15 @@
\fi
\fi
}
- \def\moodle@checkfraction{%
+ \def\moodle@checkfraction{%
+ \ifmoodle@allornothing
+ \ifnum\moodle@fraction>0%
+ \setkeys{moodle}{fraction=100}%
+ \fi
+ \ifnum\moodle@fraction<0%
+ \setkeys{moodle}{fraction=0}%
+ \fi
+ \else
%\def\test@i{#1}%
\setlength{\test@fraction}{\moodle@fraction pt}%
% take the absolute value
@@ -1276,9 +1340,10 @@
\else
\setkeys{moodle}{fraction=\test@fractionmatched}%
\fi
- }
+ \fi
+ }
-\def\savemultianswer#1{%
+\long\def\savemultianswer#1{%
\bgroup
\savemultianswer@int#1 \moodle@answer@rdelim
\passvalueaftergroup{\moodle@answers@xml}%
@@ -1287,9 +1352,12 @@
\newcommand\savemultianswer@int[1][]{%
\let\moodle@fraction\@empty%
\setkeys{moodle}{#1}%
+ \ifmoodle@allornothing
+ \moodle@singletrue
+ \fi
\savemultianswer@int@int%
}%
- \def\savemultianswer@int@int#1#2\moodle@answer@rdelim{%
+ \long\def\savemultianswer@int@int#1#2\moodle@answer@rdelim{%
\def\test@i{#1}%
\ifx\test@i\@star
\ifmoodle@single
@@ -1323,9 +1391,12 @@
}%
\gdef\writemultiquestion{%
- \writetomoodle{<question type="multichoice">}%
+
+ \writetomoodle{<question type="multichoice\ifmoodle@allornothing set\fi">}%
\moodle@writecommondata%
- \moodle@writesingle%
+ \ifmoodle@allornothing\else
+ \moodle@writesingle%
+ \fi
\moodle@writeshuffle%
\moodle@writeanswernumbering%
}%
@@ -1334,6 +1405,7 @@
\NewEnviron{truefalse}[2][]{%
\bgroup
\setkeys{moodle}{#1,questionname={#2}}%
+ \global\advance\moodle@totalmarks by \csname moodle@default grade\endcsname pt
\expandafter\gatheritems\xa{\BODY}%
\let\moodle@questionheader=\gatheredheader
%First, the LaTeX processing
@@ -1341,10 +1413,7 @@
\ifmoodle@handout
\moodle@makelatextag@qtype{truefalse}
\else
- \xa\xdef\xa\test@iii\xa{\moodle@tags}%
- \ifx\test@iii\@moodle@empty\relax\else
- \hfill tags: \texttt{\moodle@tags}
- \fi
+ \moodle@latex@writetags
\par
\noindent
\moodle@makelatextag@qtype{truefalse}
@@ -1572,10 +1641,10 @@
\setcounter{moodle@numcorrectanswers}{0}% Here this counter is for "questions" (items on the left column)
\loopthroughitemswithcommand{\moodle@print@matching@answer}%
\ifnum\c@numgathereditems<3%
- \PackageWarning{moodle}{Moodle expects at least three "answers" with matching type}
+ \PackageWarning{moodle}{Moodle expects at least three "answers" with matching type}%
\fi
\ifnum\c@moodle@numcorrectanswers<2%
- \PackageWarning{moodle}{Moodle expects at least two "questions" with the matching type}
+ \PackageWarning{moodle}{Moodle expects at least two "questions" with the matching type}%
\fi
\ifmoodle@handout
\ifmoodle@shuffle
@@ -1690,14 +1759,10 @@
\ifmoodle@handout
\moodle@makelatextag@qtype{cloze}
\else
- \xa\xdef\xa\test@iii\xa{\moodle@tags}%
- \ifx\test@iii\@moodle@empty\relax\else
- \hfill tags: \texttt{\moodle@tags}
- \fi
+ \moodle@latex@writetags
\par
\noindent
\moodle@makelatextag@qtype{cloze}
- \moodle@makelatextag@value{default grade}{\moodle@marks{\csname moodle@default grade\endcsname}}
\moodle@makelatextag@value{penalty}{penalty}
\fi
\par
@@ -1729,7 +1794,11 @@
\gdef\writeclozequestion{%
\writetomoodle{<question type="cloze">}%
- \moodle@writecommondata%
+ \moodle@writequestionname%
+ \moodle@writequestiontext%
+ \moodle@writegeneralfeedback%
+ \moodle@writepenalty%
+ \moodle@writehidden%
\moodle@writetags%
\writetomoodle{</question>}%
}%
@@ -1785,6 +1854,7 @@
\def\endclozemulti@code{\htmlize@patchendenvironment}%
\else
%LaTeX version
+ \global\advance\moodle@totalmarks by \csname moodle@default grade\endcsname pt
\moodle@questionheader% %Any introductory text just continues to be typeset.
\par
\noindent
@@ -1837,7 +1907,7 @@
\egroup%
}[\endclozemulti@code]%
-\def\moodle@print@clozemultichoice@answer#1{%
+\long\def\moodle@print@clozemultichoice@answer#1{%
\let\moodle@feedback=\@empty
\moodle@print@clozemultichoice@answer@int#1 \@rdelim%
}%
@@ -1845,7 +1915,7 @@
\setkeys{moodle}{fraction=0,#1}%
\moodle@print@clozemultichoice@answer@int@int%
}%
-\def\moodle@print@clozemultichoice@answer@int@int#1#2\@rdelim{%
+\long\def\moodle@print@clozemultichoice@answer@int@int#1#2\@rdelim{%
\def\moodle@answertext{}%
% Case 0: "(answer) \\ \hline"
% Case 1: "\item (answer)"
@@ -1904,7 +1974,7 @@
\fi
}%
-\def\saveclozemultichoiceanswer#1{%
+\long\def\saveclozemultichoiceanswer#1{%
\bgroup
\saveclozemultichoiceanswer@int#1 \moodle@answer@rdelim
\egroup
@@ -1913,7 +1983,7 @@
\setkeys{moodle}{fraction=0,#1}%
\saveclozemultichoiceanswer@int@int%
}%
-\def\saveclozemultichoiceanswer@int@int#1#2\moodle@answer@rdelim{%
+\long\def\saveclozemultichoiceanswer@int@int#1#2\moodle@answer@rdelim{%
\def\test@i{#1}%
\ifgatherbeginningofloop\else
\xa\gdef\xa\clozemulti@coding\xa{\clozemulti@coding\clozetilde}% separator between answers
@@ -1961,6 +2031,7 @@
\def\endclozenumerical@code{\htmlize@patchendenvironment}%
\else
%LaTeX version
+ \global\advance\moodle@totalmarks by \csname moodle@default grade\endcsname pt
\moodle@questionheader% %Any introductory text just continues to be typeset.
\par
\noindent
@@ -2082,6 +2153,7 @@
\def\endclozeshortanswer@code{\htmlize@patchendenvironment}%
\else
%LaTeX version
+ \global\advance\moodle@totalmarks by \csname moodle@default grade\endcsname pt
\moodle@questionheader% %Any introductory text just continues to be typeset.
\par
\noindent
@@ -2298,6 +2370,7 @@
\def\@lt{<}%
\def\@gt{>}%
+\def\@dash{-}%
\long\def\htmlize@recursive@i#1#2#3\htmlize@rdelim@i{%
% #1#2#3 is a sequence of tokens. All should be categories 11 (letter) or 12 (other).
@@ -2506,11 +2579,12 @@
\fi% \ifx\test@ii\@lsinglequote%
\else
\ifx\test@i\@rsinglequote%
- \ifx\test@ii\@rsinglequote%
- %Double right quote
- \g@addto@macro\htmlize@output{\otherampersand rdquo;}%
+ \ifx\test@ii\@rsinglequote% Double right quote
+ %AAedit 2021.01.06: in math mode, you should write 2 single right quotes, for second derivatives
+ \moodle@ifmathmode{\g@addto@macro\htmlize@output{\otherampersand rsquo;\otherampersand rsquo;}}%
+ {\g@addto@macro\htmlize@output{\otherampersand rdquo;}}%
\def\htmlize@next@i{\htmlize@recursive@i#3\htmlize@rdelim@i}%
- \else
+ \else% Single right quote
\g@addto@macro\htmlize@output{\otherampersand rsquo;}%
\def\htmlize@next@i{\htmlize@recursive@i#2#3\htmlize@rdelim@i}%
\fi% \ifx\test@ii\@rsinglequote%
@@ -2529,9 +2603,20 @@
{\g@addto@macro\htmlize@output{>}}%
\def\htmlize@next@i{\htmlize@recursive@i#2#3\htmlize@rdelim@i}%
\else
- % Default case: write first token to output, call self on remaining tokens.
- \g@addto@macro\htmlize@output{#1}%
- \def\htmlize@next@i{\htmlize@recursive@i#2#3\htmlize@rdelim@i}%
+ \ifx\test@i\@dash
+ \ifx\test@ii\@dash% en-dash (--)
+ \moodle@ifmathmode{\g@addto@macro\htmlize@output{--}}%
+ {\g@addto@macro\htmlize@output{\otherampersand ndash;}}%
+ \def\htmlize@next@i{\htmlize@recursive@i#3\htmlize@rdelim@i}%
+ \else
+ \g@addto@macro\htmlize@output{-}%
+ \def\htmlize@next@i{\htmlize@recursive@i#2#3\htmlize@rdelim@i}%
+ \fi
+ \else
+ % Default case: write first token to output, call self on remaining tokens.
+ \g@addto@macro\htmlize@output{#1}%
+ \def\htmlize@next@i{\htmlize@recursive@i#2#3\htmlize@rdelim@i}%
+ \fi% \ifx\test@i\@dash
\fi% \ifx\test@i\@gt
\fi% \ifx\test@i\@lt
\fi% \ifx\test@i\@doublequote
@@ -2785,6 +2870,7 @@
\htmlize@record@action{\endclozemode}%
\htmlize@record@action{\relax}%
+\html@action@def\%{\g@addto@macro\htmlize@output{\otherpercent}}%
\html@action@def\#{\g@addto@macro\htmlize@output{\otherhash}}%
\html@action@def\&{\g@addto@macro\htmlize@output{\otherampersand}}%
\html@action@def\\{\moodle@ifmathmode{\g@addto@macro\htmlize@output{\otherbackslash\otherbackslash}}%
@@ -2829,6 +2915,9 @@
\html@action@def\${%
\g@addto@macro\htmlize@output{\otherdollar}%
}%
+\html@action@def\@dquote{%
+ \g@addto@macro\htmlize@output{"}%
+ }%
\html@action@def\clozetilde{%
\xa\g@addto@macro\xa\htmlize@output\xa{\othertilde}%
}%
@@ -2989,20 +3078,42 @@
{\g@addto@macro\htmlize@output{\otherampersand#1caron\othersemicol}}%
{\xa\g@addto@macro\htmlize@output\xa{\string\v#1}}%
}%
-\html@def\underline#1{<SPAN STYLE=\&\#34;text-decoration: underline;\&\#34;>#1</SPAN>}
+
+{\catcode`|=3\relax
+ \gdef\htmlize@ogonek{A|E|I|U|a|e|i|u|}}
+\html@action@def\k#1{%
+ \ifinlist{#1}{\htmlize@ogonek}%
+ {\g@addto@macro\htmlize@output{\otherampersand#1ogon\othersemicol}}%
+ {
+ \bgroup
+ \def\test@i{#1}%
+ \ifx\test@i\@O
+ \def\toadd{\otherampersand\otherhash490\othersemicol}%
+ \else
+ \ifx\test@i\@o
+ \def\toadd{\otherampersand\otherhash491\othersemicol}%
+ \else
+ \def\toadd{\otherbackslash\otherlbrace#1\otherrbrace}%
+ \fi
+ \fi
+ \xa\g@addto@macro\xa\htmlize@output\xa{\toadd}%
+ \egroup
+ }%
+}%
+\html@def\underline#1{<SPAN STYLE=\@dquote text-decoration: underline;\@dquote>#1</SPAN>}%
\html@def\emph#1{<EM>#1</EM>}%
\html@def\textit#1{<I>#1</I>}%
\html@def\textbf#1{<B>#1</B>}%
\html@def\texttt#1{<CODE>#1</CODE>}%
-\html@def\textsc#1{<SPAN STYLE=\&\#34;font-variant: small-caps;\&\#34;>#1</SPAN>}
-\html@def\url#1{<A href=\&\#34;#1\&\#34;>#1</A>}%
-\html@def\href#1#2{<A href=\&\#34;#1\&\#34;>#2</A>}%
+\html@def\textsc#1{<SPAN STYLE=\@dquote font-variant: small-caps;\@dquote>#1</SPAN>}%
+\html@def\url#1{<A href=\@dquote #1\@dquote>#1</A>}%
+\html@def\href#1#2{<A href=\@dquote #1\@dquote>#2</A>}%
\html@def\textsuperscript#1{<SUP>#1</SUP>}%
\html@def\up#1{<SUP>#1</SUP>}%
\html@def\fup#1{<SUP>#1</SUP>}%
\html@def\textsubscript#1{<SUB>#1</SUB>}%
\html@def\blank{____________}%
-\html@def\par{</P><P>}%
+\html@def\par{<BR/>}%
\html@def\aa{\&aring;}%
\html@def\AA{\&Aring;}%
\html@def\ae{\&aelig;}%
@@ -3022,6 +3133,15 @@
\html@def\guillemotleft{\&laquo;\&\#8239;}%
\html@def\fg{\&\#8239;\&raquo;}%
\html@def\guillemotright{\&\#8239;\&raquo;}%
+\html@def\glqq{\&bdquo;}%
+\html@def\grqq{\&ldquo;}%
+\html@def\glq{\&sbquo;}%
+\html@def\grq{\&lsquo;}%
+\html@def\flqq{\&laquo;\&\#8239;}%
+\html@def\frqq{\&\#8239;\&raquo;}%
+\html@def\flq{\&lsaquo;}%
+\html@def\frq{\&rsaquo;}%
+\html@def\dq{\&quot;}%
\html@def\,{\&\#8239;}%
\html@def\thinspace{\&\#8239;}%
\html@def\textbackslash{\&\#92;}%
@@ -3033,6 +3153,18 @@
\htmlize@record@action\inlinemathrightdelim
\htmlize@record@action\displaymathrightdelim
+\newcommand\htmlonly[2][]{#1}%
+\html@action@newcommand{htmlonly}[2][]{%
+ \g@addto@macro\htmlize@output{#2}%
+}%
+\AtEndPreamble{%
+ \@ifpackageloaded{graphics}{%
+ \@ifpackagelater{graphics}{2019/10/08}{}{%
+ \PackageError{moodle}{`moodle' is made to interact with the `graphics'
+ package not older than 2019/10/08.}%
+ }%
+ }{}%
+}%
\def\moodle@media@find#1{%
\ifx\detokenize\@undefined\else
\edef\Gin@extensions{\detokenize\expandafter{\Gin@extensions}}%
@@ -3184,7 +3316,10 @@
}%
}%
\DeclareGraphicsAlien{.gif}{.png}{\htmlize@imagemagick@convert\otherspace '\SourceFile[0]' \OutputFile}%
- }{}%
+ }{
+ \newcommand\includegraphics[2][]{\PackageError{moodle}{"\string\includegraphics" is not defined}%
+ {Add "\string\usepackage{graphicx}" to you preamble.}}{}%}%
+ }%
}%
\define@cmdkeys{moodle@includegraphics}[moodle@graphics@]{ppi}
\define@cmdkey{moodle}[moodle@graphics@]{ppi}{}% This is so the ppi key can be set at the document, quiz, or question level.
@@ -3216,25 +3351,30 @@
\SVGtoPDF\otherspace '\SourceFile' -o '\OutputFile' 2>/dev/null}%
}%
\fi
-
-\ifmoodle@tikz
-\AfterEndPreamble{%
- %\htmlize@record@expand{\embedaspict}%
- \let\oldincludegraphics=\includegraphics
- % patching includegraphics to trigger externalization
- \renewcommand{\includegraphics}[2][]{%
- %\message{moodle.sty: Processing \string\includegraphics[#1]{#2} for HTML^^J}%
- \tikz{\node[inner sep=0pt]{\oldincludegraphics[#1]{#2}};}%
- }%
- % externalized images must be included with the regular command
- \pgfkeys{/pgf/images/include external/.code={\oldincludegraphics{#1}}}%
- \html@action@newcommand{includegraphics}[2][]{%
- \message{moodle.sty: Processing \string\includegraphics[#1]{#2} ^^J}
- \global\advance\numpicturesread by 1\relax
- \edef\htmlize@imagetag{<IMG SRC="data:\TikzExportMIME;base64,\csname picbaselxiv@\the\numpicturesread\endcsname">}%
- \xa\g@addto@macro\xa\htmlize@output\xa{\htmlize@imagetag}%
+\def\moodle@checkconversionsuccess#1#2{%
+ \IfFileExists{#1}{}{%
+ \PackageError{moodle}{#2 failed}%
+ {If the XML file is not of importance to you: use package option "draft"}%
}%
}%
+\ifmoodle@tikz
+ \AfterEndPreamble{%
+ %\htmlize@record@expand{\embedaspict}%
+ \let\oldincludegraphics=\includegraphics
+ % patching includegraphics to trigger externalization
+ \renewcommand{\includegraphics}[2][]{%
+ %\message{moodle.sty: Processing \string\includegraphics[#1]{#2} for HTML^^J}%
+ \tikz{\node[inner sep=0pt]{\oldincludegraphics[#1]{#2}};}%
+ }%
+ % externalized images must be included with the regular command
+ \pgfkeys{/pgf/images/include external/.code={\oldincludegraphics{#1}}}%
+ \html@action@newcommand{includegraphics}[2][]{%
+ \message{moodle.sty: Processing \string\includegraphics[#1]{#2} ^^J}
+ \global\advance\numpicturesread by 1\relax
+ \edef\htmlize@imagetag{<IMG SRC="data:\TikzExportMIME;base64,\csname picbaselxiv@\the\numpicturesread\endcsname">}%
+ \xa\g@addto@macro\xa\htmlize@output\xa{\htmlize@imagetag}%
+ }%
+ }%
\else
\html@action@newcommand{includegraphics}[2][]{%
\bgroup% The grouping is to localize the changes caused by \setkeys.
@@ -3284,6 +3424,7 @@
\edef\cmdline{\PDFtoSVG\otherspace "\moodle@media@base\moodle@media@ext" -o "\moodle@media@base\moodle@media@ext@current" 2>/dev/null}%
\message{moodle.sty: Converting '#2' to SVG...^^J}%
\xa\ShellEscape\xa{\cmdline}%
+ \moodle@checkconversionsuccess{\moodle@media@base\moodle@media@ext@current}{PDFtoSVG conversion}%
%Next, optimize inline
\ifwindows\else
\edef\cmdline{\optiSVG < "\moodle@media@base\moodle@media@ext@current" >
@@ -3291,6 +3432,7 @@
"\moodle@media@base\moodle@media@ext@current"}%
\message{moodle.sty: Optimizing '\moodle@media@base\moodle@media@ext@current'...^^J}%
\xa\ShellEscape\xa{\cmdline}%
+ \moodle@checkconversionsuccess{\moodle@media@base\moodle@media@ext@current}{SVG optimization}%
\fi
\else% call ImageMagick
\def\moodle@media@ext@current{.png}%
@@ -3298,10 +3440,12 @@
\edef\cmdline{\htmlize@imagemagick@convert\otherspace "\moodle@media@base\moodle@media@ext" -resize \moodle@graphics@geometry\otherspace "\moodle@media@base\moodle@media@ext@current"}%
\message{moodle.sty: Converting '#2' to PNG...^^J}%
\xa\ShellEscape\xa{\cmdline}%
+ \moodle@checkconversionsuccess{\moodle@media@base\moodle@media@ext@current}{ImageMagick conversion}%
%Next, optimize inline
\edef\cmdline{\optipng\otherspace "\moodle@media@base\moodle@media@ext@current"}%
\message{moodle.sty: Optimizing '\moodle@media@base\moodle@media@ext@current'...^^J}%
\xa\ShellEscape\xa{\cmdline}%
+ \moodle@checkconversionsuccess{\moodle@media@base\moodle@media@ext@current}{PNG optimization}%
\fi
\fi
%Next, convert the file to base64 encoding
@@ -3325,27 +3469,25 @@
\egroup
}%
\fi
+\def\ConvertToBaseLXIV#1#2{%
+ \message{moodle.sty: Converting '#1#2' to base64...^^J}%
+ \ConvertToBaseLXIV@int{#1}{#2}
+ \xa\ShellEscape\xa{\cmdline}%
+ \moodle@checkconversionsuccess{#1.enc}{Base64 conversion}%
+}%
\ifwindows
- \def\ConvertToBaseLXIV#1#2{%
- \def\cmdline{\baselxiv\otherspace -encode "#1#2"\otherspace tmp.b64 && findstr /vbc:"---" tmp.b64 > "#1" && del tmp.b64"}%
- \message{moodle.sty: Converting '#1#2' to base64...^^J}%
- \xa\ShellEscape\xa{\cmdline}%
- % Starting from Windows 7, CertUtil is included by default. There should be no windows XP still running
- }%
+ \def\ConvertToBaseLXIV@int#1#2{%
+ \def\cmdline{\baselxiv\otherspace -encode "#1#2"\otherspace tmp.b64 && findstr /vbc:"---" tmp.b64 > "#1.enc" && del tmp.b64}%
+ }% Starting from Windows 7, CertUtil is included by default. There should be no windows XP still running
\else
\ifmacosx
- \def\ConvertToBaseLXIV#1#2{%
+ \def\ConvertToBaseLXIV@int#1#2{%
\def\cmdline{\baselxiv\otherspace -b 64 -i "#1#2"\otherspace -o "#1.enc"}%
- \message{moodle.sty: Converting '#1#2' to base64...^^J}%
- \xa\ShellEscape\xa{\cmdline}%
}%
\else % Linux, Cygwin
- \def\ConvertToBaseLXIV#1#2{%
+ \def\ConvertToBaseLXIV@int#1#2{%
\def\cmdline{\baselxiv\otherspace "#1#2"\otherspace > "#1.enc"}%
- \message{moodle.sty: Converting '#1#2' to base64...^^J}%
- \xa\ShellEscape\xa{\cmdline}%
- }%
- % base64 is part of coreutils, add "-w 64" to get exactly the previous behavior %
+ }% base64 is part of coreutils, add "-w 64" to get exactly the previous behavior %
\fi
\fi
\newread\baseLXIVdatafile
@@ -3385,32 +3527,44 @@
\ifpdfoutput% tex engines defaulting to PDF output (pdflatex, xelatex, lualatex)
\def\ExportTikz{ \message{moodle.sty: Converting picture '\moodle@basename.pdf' to SVG...^^J}%
\edef\cmdline{\PDFtoSVG\otherspace "\moodle@basename.pdf" -o "\moodle@basename\TikzExportExtension" 2>/dev/null}%
- \xa\ShellEscape\xa{\cmdline}}%
+ \xa\ShellEscape\xa{\cmdline}%
+ \moodle@checkconversionsuccess{\moodle@basename\TikzExportExtension}{PDFtoSVG conversion}%
+ }%
\else % latex
\def\ExportTikz{ \message{moodle.sty: Converting picture '\moodle@basename.ps' to SVG...^^J}%
\edef\cmdline{\PDFtoSVG\otherspace "\moodle@basename.ps" -o "\moodle@basename\TikzExportExtension" 2>/dev/null}%
- \xa\ShellEscape\xa{\cmdline}}%
+ \xa\ShellEscape\xa{\cmdline}%
+ \moodle@checkconversionsuccess{\moodle@basename\TikzExportExtension}{PStoSVG conversion}%
+ }%
\fi
\def\OptimizeExport{ \message{moodle.sty: Optimizing '\moodle@basename.svg'...^^J}%
\edef\cmdline{\optiSVG\otherspace < "\moodle@basename\TikzExportExtension" >
"\moodle@basename.tmp.svg" && mv "\moodle@basename.tmp.svg"
"\moodle@basename\TikzExportExtension" }%
- \xa\ShellEscape\xa{\cmdline}}%
+ \xa\ShellEscape\xa{\cmdline}%
+ \moodle@checkconversionsuccess{\moodle@basename\TikzExportExtension}{SVG optimization}%
+ }%
\else
\def\TikzExportExtension{.png}%
\def\TikzExportMIME{image/png}%
\ifpdfoutput% tex engines defaulting to PDF output (pdflatex, xelatex, lualatex)
\def\ExportTikz{ \message{moodle.sty: Converting picture '\moodle@basename.pdf' to PNG...^^J}%
\edef\gscmdline{\gs\otherspace -sOutputFile=\moodle@basename\TikzExportExtension\otherspace -r150 \moodle@basename.pdf}%
- \xa\ShellEscape\xa{\gscmdline}}%
+ \xa\ShellEscape\xa{\gscmdline}%
+ \moodle@checkconversionsuccess{\moodle@basename\TikzExportExtension}{Ghostscript conversion}%
+ }%
\else % latex
\def\ExportTikz{ \message{moodle.sty: Converting picture '\moodle@basename.ps' to PNG...^^J}%
\edef\gscmdline{\gs\otherspace -sOutputFile=\moodle@basename\TikzExportExtension\otherspace -r150 \\moodle@basename.ps}%
- \xa\ShellEscape\xa{\gscmdline}}%
+ \xa\ShellEscape\xa{\gscmdline}%
+ \moodle@checkconversionsuccess{\moodle@basename\TikzExportExtension}{Ghostscript conversion}%
+ }%
\fi
\def\OptimizeExport{ \message{moodle.sty: Optimizing '\moodle@basename.png'...^^J}%
\edef\cmdline{\optipng\otherspace \moodle@basename\TikzExportExtension}%
- \xa\ShellEscape\xa{\cmdline}}%
+ \xa\ShellEscape\xa{\cmdline}%
+ \moodle@checkconversionsuccess{\moodle@basename\TikzExportExtension}{PNG optimization}%
+ }%
\fi
\let\moodle@oldtikzpicture=\tikzpicture
%The following code lets us run things *before* the normal \begin{tikzpicture}.
@@ -3432,6 +3586,7 @@
\ExportTikz
\OptimizeExport
\ConvertToBaseLXIV{\moodle@basename}{\TikzExportExtension}%
+ \IfFileExists{\moodle@basename.enc}{}{\PackageError{moodle}{Conversion failed}{Check your base64 conversion utiliy}}%
\message{moodle.sty: Reading base64 file '\tikzexternalrealjob-tikztemp-\the\numconvertedpictures.enc'...^^J}%
\savebaselxivdata
\message{moodle.sty: base64 data saved.^^J}%
@@ -3829,6 +3984,19 @@
\xa\moodle@VerbatimInput\xa{\csname minted@infileHTML\the\c@moodle@pygmentizecounter\endcsname}%
}%
\AtBeginDocument{%
+ \def\moodle@babel@german@warn{\PackageWarning{moodle}{Be careful when using moodle
+ and German-related babel package options. The symbol " is made active and your umlauts
+ will confuse moodle. You can either 1) compile with xelatex/lualatex with UTF-8 coded
+ characters or 2) avoid the babel option.}
+ }
+ \@ifpackagewith{babel}{german}{\moodle@babel@german@warn}{\relax}%
+ \@ifpackagewith{babel}{austrian}{\moodle@babel@german@warn}{\relax}%
+ \@ifpackagewith{babel}{swissgerman}{\moodle@babel@german@warn}{\relax}%
+ \@ifpackagewith{babel}{swissgerman.toss}{\moodle@babel@german@warn}{\relax}%
+ \@ifpackagewith{babel}{ngerman}{\moodle@babel@german@warn}{\relax}%
+ \@ifpackagewith{babel}{naustrian}{\moodle@babel@german@warn}{\relax}%
+ \@ifpackagewith{babel}{nswissgerman}{\moodle@babel@german@warn}{\relax}%
+ \@ifpackagewith{babel}{nswissgerman.toss}{\moodle@babel@german@warn}{\relax}%
\ifPDFTeX % pdflatex or latex
\@ifpackagewith{babel}{french}{%
\PackageWarning{moodle}{Be careful when using LaTeX, moodle, and the babel package with option 'french'. Autospacing produces in undesired symbols in the XML. You can either 1) compile with xelatex/lualatex or 2) add '\NoAutoSpacing' after '\begin{quiz}'.}%