texlive[57683] Master/texmf-dist: moodle (8feb21)

commits+karl at tug.org commits+karl at tug.org
Mon Feb 8 22:58:25 CET 2021


Revision: 57683
          http://tug.org/svn/texlive?view=revision&revision=57683
Author:   karl
Date:     2021-02-08 22:58:24 +0100 (Mon, 08 Feb 2021)
Log Message:
-----------
moodle (8feb21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/moodle/README.md
    trunk/Master/texmf-dist/doc/latex/moodle/moodle.pdf
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_autopoints-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_calculated_python-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_multi-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_numerical-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_shortanswer-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_commands-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_environments-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_escaping_right_braces_in_cloze-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_essay-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_french-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_generalfeedback-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_handout-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_macros-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_mathenv-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_special_characters-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tags-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tikz-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tikz_with_svg-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tolerance-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/test_essay.tex
    trunk/Master/texmf-dist/doc/latex/moodle/test/test_special_characters.tex
    trunk/Master/texmf-dist/doc/latex/moodle/test/test_tags.tex
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_autopoints-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_calculated_lua-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_calculated_python-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_multi-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_numerical-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_shortanswer-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_commands-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_environments-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_escaping_right_braces_in_cloze-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_essay-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_french-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_generalfeedback-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_handout-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_macros-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_mathenv-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_special_characters-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tags-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tikz-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tikz_with_svg-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tolerance-moodle.ref
    trunk/Master/texmf-dist/source/latex/moodle/makefile
    trunk/Master/texmf-dist/source/latex/moodle/moodle.dtx
    trunk/Master/texmf-dist/tex/latex/moodle/moodle.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/moodle/test/fig/NoodlE_logo.png
    trunk/Master/texmf-dist/doc/latex/moodle/test/fig/NoodlE_logo.svg
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_allornothing-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_german-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_htmlonly-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_math-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_paragraph_breaks-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_shortanswer-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/test_allornothing.tex
    trunk/Master/texmf-dist/doc/latex/moodle/test/test_german.tex
    trunk/Master/texmf-dist/doc/latex/moodle/test/test_htmlonly.tex
    trunk/Master/texmf-dist/doc/latex/moodle/test/test_math.tex
    trunk/Master/texmf-dist/doc/latex/moodle/test/test_paragraph_breaks.tex
    trunk/Master/texmf-dist/doc/latex/moodle/test/test_shortanswer.tex
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_allornothing-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_german-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_htmlonly-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_math-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_paragraph_breaks-moodle.ref
    trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_shortanswer-moodle.ref

Modified: trunk/Master/texmf-dist/doc/latex/moodle/README.md
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/moodle/moodle.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/latex/moodle/test/fig/NoodlE_logo.png
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/moodle/test/fig/NoodlE_logo.png
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/fig/NoodlE_logo.png	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/fig/NoodlE_logo.png	2021-02-08 21:58:24 UTC (rev 57683)

Property changes on: trunk/Master/texmf-dist/doc/latex/moodle/test/fig/NoodlE_logo.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/moodle/test/fig/NoodlE_logo.svg
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/fig/NoodlE_logo.svg	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/fig/NoodlE_logo.svg	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Added: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_allornothing-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_allornothing-moodle.ref	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_allornothing-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_autopoints-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_autopoints-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_autopoints-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_calculated_python-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_calculated_python-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_calculated_python-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_multi-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_multi-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_multi-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_numerical-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_numerical-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_numerical-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -15,7 +15,6 @@
   <questiontext format="html">
     <text><![CDATA[<p>Enter an integer \(n\) such that \(0< n\leq 2\). {1:NUMERICAL:%10%0:0.001#study difference between \(<\) 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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_shortanswer-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_shortanswer-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_cloze_shortanswer-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_commands-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_commands-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_commands-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -35,10 +35,10 @@
     <text><![CDATA[<p><CODE>typewriter</CODE></p>]]></text>
   </answer>
   <answer fraction="100" format="html">
-    <text><![CDATA[<p><SPAN STYLE="font-variant: small-caps;">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="text-decoration: underline;">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="http://192.0.0.256">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="mailto:name at server.com">Contact me</A></p>]]></text>
+    <text><![CDATA[<p><A href="mailto:name at server.com">Contact me</A></p>]]></text>
   </answer>
 </question>
  

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_environments-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_environments-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_environments-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -13,7 +13,7 @@
     <text><![CDATA[LaTeX Environments]]></text>
   </name>
   <questiontext format="html">
-    <text><![CDATA[<p><CENTER><SPAN STYLE="font-variant: small-caps;">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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_escaping_right_braces_in_cloze-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_escaping_right_braces_in_cloze-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_escaping_right_braces_in_cloze-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_essay-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_essay-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_essay-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>
  

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_french-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_french-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_french-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -13,7 +13,7 @@
     <text><![CDATA[Test french]]></text>
   </name>
   <questiontext format="html">
-    <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>
+    <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 !</p>]]></text>
-    <feedback format="html"><text><![CDATA[<p>cité dans «  <A href="https://jacques-andre.fr/faqtypo/lessons.pdf">Petites leçons de typographie</A>  » de Jacques <SPAN STYLE="font-variant: small-caps;">André</SPAN>.</p>]]></text></feedback>
+    <feedback format="html"><text><![CDATA[<p>cité dans «  <A href="https://jacques-andre.fr/faqtypo/lessons.pdf">Petites leçons de typographie</A>  » 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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_generalfeedback-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_generalfeedback-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_generalfeedback-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -103,11 +103,11 @@
   <shuffleanswers>1</shuffleanswers>
   <subquestion format="html">
     <text><![CDATA[<p>æ</p>]]></text>
-    <answer><text>oui</text></answer>
+    <answer><text>oui </text></answer>
   </subquestion>
   <subquestion format="html">
     <text><![CDATA[<p>œ</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>ÅŒ{1:MULTICHOICE:=chip~%10%chop#yes~chap#no.} »Å{1:SHORTANSWER:=B#toc~=C#«  »~*}« Å{1:NUMERICAL:=1:0~=2:0#«  »~3:0}Œ{1:MULTICHOICE_V:=chip#yes~%10%chop~chap#no.}</P><P>Œ{1:MULTICHOICE_H:=chip#yes~%10%chop~chap#no.}</P><P></p>]]></text>
+    <text><![CDATA[<p>ÅŒ{1:MULTICHOICE:=chip~%10%chop#yes~chap#no.} »Å{1:SHORTANSWER:=B#toc~=C#«  »~*}« Å{1:NUMERICAL:=1:0~=2:0#«  »~3:0}Œ{1:MULTICHOICE_V:=chip#yes~%10%chop~chap#no.}<BR/>Œ{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>

Added: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_german-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_german-moodle.ref	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_german-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>„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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_handout-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_handout-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_handout-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Added: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_htmlonly-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_htmlonly-moodle.ref	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_htmlonly-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_macros-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_macros-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_macros-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Added: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_math-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_math-moodle.ref	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_math-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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’(x)\)</p>]]></text>
+  </answer>
+  <answer fraction="0" format="html">
+    <text><![CDATA[<p>\(f’’(x)\)</p>]]></text>
+  </answer>
+  <answer fraction="100" format="html">
+    <text><![CDATA[<p>\(f’’’(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’(t)\)~=\(g’’(t)\)~\(g’’’(t)\)}</p>]]></text>
+  </questiontext>
+  <generalfeedback format="html"><text/></generalfeedback>
+  <penalty>0.10</penalty>
+  <hidden>0</hidden>
+</question>
+ 
+</quiz>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_mathenv-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_mathenv-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_mathenv-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Added: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_paragraph_breaks-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_paragraph_breaks-moodle.ref	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_paragraph_breaks-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Added: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_shortanswer-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_shortanswer-moodle.ref	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_shortanswer-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>”40%”</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>”40%”</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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_special_characters-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_special_characters-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_special_characters-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -33,10 +33,10 @@
 </question>
 <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>
@@ -46,12 +46,12 @@
   <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>
  

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tags-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tags-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tags-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -32,6 +32,7 @@
   </answer>
   <tags>
     <tag><text><![CDATA[multi\xE9\xE0\xEE]]></text></tag>
+    <tag><text><![CDATA[Åæœ]]></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>æ</p>]]></text>
-    <answer><text>oui</text></answer>
+    <answer><text>oui </text></answer>
   </subquestion>
   <subquestion format="html">
     <text><![CDATA[<p>œ</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>Å</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> æ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>ÅŒ{1:MULTICHOICE:=chip~%10%chop#yes~chap#no.} »Å{1:SHORTANSWER:=B#toc~=C#«  »~*}« Å{1:NUMERICAL:=1:0~=2:0#«  »~3:0}Œ{1:MULTICHOICE_V:=chip#yes~%10%chop~chap#no.}</P><P>Œ{1:MULTICHOICE_H:=chip#yes~%10%chop~chap#no.}</P><P></p>]]></text>
+    <text><![CDATA[<p>ÅŒ{1:MULTICHOICE:=chip~%10%chop#yes~chap#no.} »Å{1:SHORTANSWER:=B#toc~=C#«  »~*}« Å{1:NUMERICAL:=1:0~=2:0#«  »~3:0}Œ{1:MULTICHOICE_V:=chip#yes~%10%chop~chap#no.}<BR/>Œ{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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tikz-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tikz-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tikz-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -195,7 +195,7 @@
 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 @@
 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 @@
 UtIG9kCVjKcc64Ac7pDMO+VgNS8cQCTzZzCH/QKY4mhgQAMAKiMPa9oLlkgAAAAASUVORK5CYII= 
 ">}</p>]]></text>
   </questiontext>
-  <defaultgrade>1</defaultgrade>
   <generalfeedback format="html"><text/></generalfeedback>
   <penalty>0.10</penalty>
   <hidden>0</hidden>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tikz_with_svg-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tikz_with_svg-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tikz_with_svg-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -311,7 +311,7 @@
 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 @@
 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 @@
 L3RzcGFuPjwvdGV4dD48L2c+PC9nPjwvZz48L2c+PC9zdmc+Cg== 
 ">}</p>]]></text>
   </questiontext>
-  <defaultgrade>1</defaultgrade>
   <generalfeedback format="html"><text/></generalfeedback>
   <penalty>0.10</penalty>
   <hidden>0</hidden>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tolerance-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tolerance-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/latin1ref/test_tolerance-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Added: trunk/Master/texmf-dist/doc/latex/moodle/test/test_allornothing.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/test_allornothing.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/test_allornothing.tex	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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


Property changes on: trunk/Master/texmf-dist/doc/latex/moodle/test/test_allornothing.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/test_essay.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/test_essay.tex	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/test_essay.tex	2021-02-08 21:58:24 UTC (rev 57683)
@@ -17,8 +17,8 @@
 
 \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

Added: trunk/Master/texmf-dist/doc/latex/moodle/test/test_german.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/test_german.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/test_german.tex	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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}


Property changes on: trunk/Master/texmf-dist/doc/latex/moodle/test/test_german.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/moodle/test/test_htmlonly.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/test_htmlonly.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/test_htmlonly.tex	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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}
+
+


Property changes on: trunk/Master/texmf-dist/doc/latex/moodle/test/test_htmlonly.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/moodle/test/test_math.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/test_math.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/test_math.tex	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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}
+
+


Property changes on: trunk/Master/texmf-dist/doc/latex/moodle/test/test_math.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/moodle/test/test_paragraph_breaks.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/test_paragraph_breaks.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/test_paragraph_breaks.tex	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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


Property changes on: trunk/Master/texmf-dist/doc/latex/moodle/test/test_paragraph_breaks.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/moodle/test/test_shortanswer.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/test_shortanswer.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/test_shortanswer.tex	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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}


Property changes on: trunk/Master/texmf-dist/doc/latex/moodle/test/test_shortanswer.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/test_special_characters.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/test_special_characters.tex	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/test_special_characters.tex	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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.
 

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/test_tags.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/test_tags.tex	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/test_tags.tex	2021-02-08 21:58:24 UTC (rev 57683)
@@ -9,18 +9,16 @@
 \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
@@ -27,23 +25,20 @@
 	\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 @@
 	\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 @@
 			\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 @@
 		\end{multi}
 		
 	\end{cloze}
-	
+
 \end{quiz}
 
 \end{document}

Added: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_allornothing-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_allornothing-moodle.ref	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_allornothing-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_autopoints-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_autopoints-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_autopoints-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_calculated_lua-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_calculated_lua-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_calculated_lua-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_calculated_python-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_calculated_python-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_calculated_python-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_multi-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_multi-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_multi-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_numerical-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_numerical-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_numerical-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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< n\leq 2\). {1:NUMERICAL:%10%0:0.001#study difference between \(<\) 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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_shortanswer-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_shortanswer-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_cloze_shortanswer-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_commands-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_commands-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_commands-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -35,10 +35,10 @@
     <text><![CDATA[<p><CODE>typewriter</CODE></p>]]></text>
   </answer>
   <answer fraction="100" format="html">
-    <text><![CDATA[<p><SPAN STYLE="font-variant: small-caps;">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="text-decoration: underline;">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="http://192.0.0.256">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="mailto:name at server.com">Contact me</A></p>]]></text>
+    <text><![CDATA[<p><A href="mailto:name at server.com">Contact me</A></p>]]></text>
   </answer>
 </question>
  

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_environments-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_environments-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_environments-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -13,7 +13,7 @@
     <text><![CDATA[LaTeX Environments]]></text>
   </name>
   <questiontext format="html">
-    <text><![CDATA[<p><CENTER><SPAN STYLE="font-variant: small-caps;">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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_escaping_right_braces_in_cloze-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_escaping_right_braces_in_cloze-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_escaping_right_braces_in_cloze-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_essay-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_essay-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_essay-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>
  

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_french-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_french-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_french-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -13,7 +13,7 @@
     <text><![CDATA[Test french]]></text>
   </name>
   <questiontext format="html">
-    <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>
+    <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 !</p>]]></text>
-    <feedback format="html"><text><![CDATA[<p>cité dans « <A href="https://jacques-andre.fr/faqtypo/lessons.pdf">Petites leçons de typographie</A> » de Jacques <SPAN STYLE="font-variant: small-caps;">André</SPAN>.</p>]]></text></feedback>
+    <feedback format="html"><text><![CDATA[<p>cité dans « <A href="https://jacques-andre.fr/faqtypo/lessons.pdf">Petites leçons de typographie</A> » 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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_generalfeedback-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_generalfeedback-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_generalfeedback-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>æ</p>]]></text>
-    <answer><text>oui</text></answer>
+    <answer><text>oui </text></answer>
   </subquestion>
   <subquestion format="html">
     <text><![CDATA[<p>œ</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>ÅŒ{1:MULTICHOICE:=chip~%10%chop#yes~chap#no.} »Å{1:SHORTANSWER:=B#toc~=C#«  »~*}« Å{1:NUMERICAL:=1:0~=2:0#«  »~3:0}Œ{1:MULTICHOICE_V:=chip#yes~%10%chop~chap#no.}</P><P>Œ{1:MULTICHOICE_H:=chip#yes~%10%chop~chap#no.}</P><P></p>]]></text>
+    <text><![CDATA[<p>ÅŒ{1:MULTICHOICE:=chip~%10%chop#yes~chap#no.} »Å{1:SHORTANSWER:=B#toc~=C#«  »~*}« Å{1:NUMERICAL:=1:0~=2:0#«  »~3:0}Œ{1:MULTICHOICE_V:=chip#yes~%10%chop~chap#no.}<BR/>Œ{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>

Added: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_german-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_german-moodle.ref	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_german-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_handout-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_handout-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_handout-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Added: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_htmlonly-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_htmlonly-moodle.ref	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_htmlonly-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_macros-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_macros-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_macros-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Added: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_math-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_math-moodle.ref	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_math-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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’(x)\)</p>]]></text>
+  </answer>
+  <answer fraction="0" format="html">
+    <text><![CDATA[<p>\(f’’(x)\)</p>]]></text>
+  </answer>
+  <answer fraction="100" format="html">
+    <text><![CDATA[<p>\(f’’’(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’(t)\)~=\(g’’(t)\)~\(g’’’(t)\)}</p>]]></text>
+  </questiontext>
+  <generalfeedback format="html"><text/></generalfeedback>
+  <penalty>0.10</penalty>
+  <hidden>0</hidden>
+</question>
+ 
+</quiz>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_mathenv-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_mathenv-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_mathenv-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Added: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_paragraph_breaks-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_paragraph_breaks-moodle.ref	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_paragraph_breaks-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Added: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_shortanswer-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_shortanswer-moodle.ref	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_shortanswer-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>”40%”</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>”40%”</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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_special_characters-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_special_characters-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_special_characters-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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[Å À Â Ã É È Ë Ê Î Ï Ñ Õ Ö Ô Ù Ü Û Ç Ş Ţ Ő Ű Ÿ Ă Ĕ Ğ Ĭ Ŏ Ŭ Č Ď Ě Ľ Ň Ř Š Ť Ž ]]></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>
@@ -46,12 +46,12 @@
   <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>
  

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tags-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tags-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tags-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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[Åæœ]]></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>æ</p>]]></text>
-    <answer><text>oui</text></answer>
+    <answer><text>oui </text></answer>
   </subquestion>
   <subquestion format="html">
     <text><![CDATA[<p>œ</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>Å</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> æ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>ÅŒ{1:MULTICHOICE:=chip~%10%chop#yes~chap#no.} »Å{1:SHORTANSWER:=B#toc~=C#«  »~*}« Å{1:NUMERICAL:=1:0~=2:0#«  »~3:0}Œ{1:MULTICHOICE_V:=chip#yes~%10%chop~chap#no.}</P><P>Œ{1:MULTICHOICE_H:=chip#yes~%10%chop~chap#no.}</P><P></p>]]></text>
+    <text><![CDATA[<p>ÅŒ{1:MULTICHOICE:=chip~%10%chop#yes~chap#no.} »Å{1:SHORTANSWER:=B#toc~=C#«  »~*}« Å{1:NUMERICAL:=1:0~=2:0#«  »~3:0}Œ{1:MULTICHOICE_V:=chip#yes~%10%chop~chap#no.}<BR/>Œ{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>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tikz-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tikz-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tikz-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -199,7 +199,7 @@
 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 @@
 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 @@
 UtIG9gZAzinHOiCHOyTzThpYzQsHEMn8Gcxhf4CsHQQAyX8PqblssX8AAAAASUVORK5CYII= 
 ">}</p>]]></text>
   </questiontext>
-  <defaultgrade>1</defaultgrade>
   <generalfeedback format="html"><text/></generalfeedback>
   <penalty>0.10</penalty>
   <hidden>0</hidden>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tikz_with_svg-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tikz_with_svg-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tikz_with_svg-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -319,7 +319,7 @@
 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 @@
 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 @@
 Cg== 
 ">}</p>]]></text>
   </questiontext>
-  <defaultgrade>1</defaultgrade>
   <generalfeedback format="html"><text/></generalfeedback>
   <penalty>0.10</penalty>
   <hidden>0</hidden>

Modified: trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tolerance-moodle.ref
===================================================================
--- trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tolerance-moodle.ref	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_tolerance-moodle.ref	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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>

Modified: trunk/Master/texmf-dist/source/latex/moodle/makefile
===================================================================
--- trunk/Master/texmf-dist/source/latex/moodle/makefile	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/source/latex/moodle/makefile	2021-02-08 21:58:24 UTC (rev 57683)
@@ -26,7 +26,7 @@
 
 distclean: $(TESTDIR)/distclean
 	rm -rf *.pdf *.xml *.zip
-	rm -rf texmf/ $(@mkdir -p ./$(PROJECT_NAME)/
+	rm -rf texmf/ ./$(PROJECT_NAME)/
 
 test: $(TESTDIR)/test
 

Modified: trunk/Master/texmf-dist/source/latex/moodle/moodle.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/moodle/moodle.dtx	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/source/latex/moodle/moodle.dtx	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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.
 % 
-% \subsection{Question Types}
+% Users willing to specify a same tag for all questions of the quiz could
+% also rely on Moodle's category mechanism.
 % 
+% \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 |<| and |>| \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 |–| \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 at 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 at stamp -->}%
     \def\moodle at stamp{running on \platformname}%
-    \g at addto@macro{\moodle at stamp}{ with the package moodle v0.8 }%
+    \g at addto@macro{\moodle at stamp}{ with the package moodle v0.9 }%
     \writetomoodle{<!-- \moodle at stamp -->}%
   \fi
   \immediate\write\moodle at outfile{}%
@@ -1867,6 +2044,7 @@
 }{}%
 }}%
 \newcommand*\@enumeratename{enumerate}%
+\newdimen\moodle at totalmarks \moodle at totalmarks=0pt%
 \newenvironment{quiz}[2][]{%
   \setkeys{moodle}{#1}%
   \gdef\setcategory##1{%
@@ -1873,7 +2051,7 @@
     % 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 at warning{Empty question list}}%
+      \def\@noitemerr{}%\@latex at warning{Empty question list}
       \end{enumerate}%
     \fi
     \gdef\moodle at currentcategory{##1}%
@@ -1894,7 +2072,7 @@
     \begin{enumerate}%
   }%
   \gdef\setsubcategory##1{%
-    \def\@noitemerr{\@latex at warning{Empty question list}}%
+    \def\@noitemerr{}%\@latex at warning{Empty question list}
     \end{enumerate}%
     \moodle at write@category at xml{\moodle at currentcategory/##1}%
     \ifmoodle at section
@@ -1915,6 +2093,7 @@
   \setcategory{#2}%
 }{%
   \end{enumerate}%
+  \emph{Total of marks: \strip at pt\moodle at totalmarks}%
   \let\setcategory\relax
   \let\setsubcategory\relax
 }%
@@ -2053,21 +2232,29 @@
   }%
 }%
 
-\def\generate at moodle@write at tags#1{%
-  % #1 = NAME for \moodle at writeNAME
-  % #3 = what, exactly, to write
-  \xa\gdef\csname moodle at writetags\endcsname{%
-    %\xa\xa\xdef\xa\xa\ds\xa\xa{Encountered '\string #1'}\show\ds
-    \xa\xdef\xa\test at iii\xa{\moodle at tags}%
-    \ifx\test at iii\@moodle at empty\relax\else
-      \xa\converttohtmlmacro\xa\moodle at htmltowrite\xa{\moodle at tags}%
-      \writetomoodle[2]{  <tags>}%
+\def\moodle at writetags{%
+  \xa\xdef\xa\test at iii\xa{\moodle at tags}%
+  \ifx\test at iii\@moodle at empty\relax\else
+    \writetomoodle[2]{  <tags>}%
+    \renewcommand*{\do}[1]{%
+      \def\moodle at tagtext{##1}%
+      \xa\converttohtmlmacro\xa\moodle at htmltowrite\xa{\moodle at tagtext}%
       \writetomoodle[4]{    <tag><text><![CDATA[\moodle at htmltowrite]]></text></tag>}%
-      \writetomoodle[2]{  </tags>}%
-    \fi
-  }%
+    }
+    \xa\docsvlist\xa{\moodle at tags}%
+    \writetomoodle[2]{  </tags>}%
+  \fi
 }%
-
+\newif\ifmoodle at firsttag
+\moodle at firsttagtrue
+\def\moodle at latex@writetags{%
+  \xa\xdef\xa\test at iii\xa{\moodle at tags}%
+  \ifx\test at iii\@moodle at empty\relax\else
+    \hfill tags: %
+    \renewcommand*{\do}[1]{\ifmoodle at firsttag\moodle at firsttagfalse\else, \fi\texttt{##1}}%
+    \xa\docsvlist\xa{\test at 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 at tags.
       \define at cmdkey{moodle}[moodle@]{tags}[]{}%
-      \generate at moodle@write at tags{\csname moodle at 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 at moodle@write at code*{shuffle}<shuffleanswers>{\ifmoodle at 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 at 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 at totalmarks by \csname moodle at default grade\endcsname pt
       \expandafter\gatheritems\xa{\BODY}%
       \let\moodle at questionheader=\gatheredheader
       %First, the LaTeX processing
@@ -2498,10 +2689,7 @@
       \ifmoodle at handout
         \moodle at makelatextag@qtype{#1}
       \else
-        \xa\xdef\xa\test at iii\xa{\moodle at tags}%
-        \ifx\test at iii\@moodle at empty\relax\else
-          \hfill tags: \texttt{\moodle at tags}
-        \fi
+        \moodle at latex@writetags
         \par
         \noindent
         \moodle at 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 at questiontext=\BODY
-    \trim at spaces@in\moodle at questiontext
-    \ifx\moodle at questiontext\@empty\relax\else%
-      %First, the LaTeX processing.
-      \item \textbf{\moodle at questionname}
-      \ifmoodle at handout\else
-        \xa\xdef\xa\test at iii\xa{\moodle at tags}%
-        \ifx\test at iii\@moodle at empty\relax\else
-          \hfill tags: \texttt{\moodle at 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 at questiontext=\BODY
+      \trim at spaces@in\moodle at questiontext
+      \ifx\moodle at questiontext\@empty\relax\else%
+        %First, the LaTeX processing.
+        \item \textbf{\moodle at questionname}
+        \ifmoodle at handout\else
+          \moodle at latex@writetags
+          \par
+          \noindent
         \fi
-        \par
+        \moodle at makelatextag@qtype{description}\par
         \noindent
-      \fi
-      \moodle at makelatextag@qtype{description}\par
-      \noindent
-      \moodle at questiontext\par
-      \ifmoodle at handout\else
-        \ifx\moodle at feedback\@empty\relax\else
-          \fbox{\parbox{\linewidth}{\emph{\moodle at feedback}}}%
+        \moodle at questiontext\par
+        \ifmoodle at handout\else
+          \ifx\moodle at feedback\@empty\relax\else
+            \fbox{\parbox{\linewidth}{\emph{\moodle at feedback}}}%
+          \fi
         \fi
+        %Now, writing information to memory.
+        \@moodle at ifgeneratexml{%
+          \writetomoodle{<question type="description">}%
+          \moodle at writecommondata
+          \moodle at writetags%
+          \writetomoodle{</question>}%
+        }{}%
       \fi
-      %Now, writing information to memory.
-      \@moodle at ifgeneratexml{%
-        \writetomoodle{<question type="description">}%
-        \moodle at writecommondata
-        \moodle at 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 at questionheader
   \ifnum\c at numgathereditems>0\relax
     \begin{itemize} \setlength\itemsep{0pt}\setlength\parskip{0pt}%
       \loopthroughitemswithcommand{\moodle at print@essay at answer}%
@@ -2601,6 +2788,8 @@
 \NewEnviron{essay}[2][]{%
   \bgroup
     \setkeys{moodle}{#1,questionname={#2}}%
+    \global\advance\moodle at totalmarks by \csname moodle at default grade\endcsname pt
+    \moodle at checkresponsefieldlines
     \expandafter\gatheritems\expandafter{\BODY}%
     \let\moodle at questionheader=\gatheredheader
     %First, the LaTeX processing.
@@ -2608,10 +2797,7 @@
       \ifmoodle at handout
         \moodle at makelatextag@qtype{essay}
       \else
-        \xa\xdef\xa\test at iii\xa{\moodle at tags}%
-        \ifx\test at iii\@moodle at empty\relax\else
-          \hfill tags: \texttt{\moodle at tags}
-        \fi
+        \moodle at latex@writetags
         \par
         \noindent
         \moodle at makelatextag@qtype{essay}
@@ -2621,7 +2807,9 @@
       \fi
       \par
       \noindent
-      \ifx\moodle at responsetemplate\@empty\relax\else%
+      \moodle at questionheader
+      \long\def\@lempty{}%
+      \ifx\moodle at responsetemplate\@lempty\else
         \par\noindent \emph{Template:}
         \par\fbox{\parbox{\linewidth}{\moodle at responsetemplate}}\par
       \fi
@@ -2660,6 +2848,31 @@
   \egroup
 }%
 
+\def\moodle at checkresponsefieldlines{%
+  \newcount\a\a=\number\csname moodle at 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 at response field lines\endcsname% equality holds if we had 5, 10, 15, 20, 25, 30, or 40
+  \else
+    \ifnum\csname moodle at response field lines\endcsname>5%
+      \ifnum\csname moodle at 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 at 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 at numgathereditems=0\relax through its \else and \fi,
@@ -2704,12 +2917,12 @@
     \moodle at writeattachmentsrequired%
 }%
 
-\def\moodle at print@essay at answer#1{%
+\long\def\moodle at print@essay at answer#1{%
     \item #1%
 }%
 
 
-\def\moodle at savegraderinfo#1{%
+\long\def\moodle at savegraderinfo#1{%
   %\def\ds{#1}\show\ds
   \bgroup
     \moodle at savegraderinfo@int#1\moodle at answer@rdelim
@@ -2720,7 +2933,7 @@
   \setkeys{moodle}{fraction=0,#1}%
   \moodle at savegraderinfo@int at int%
 }%
-\def\moodle at savegraderinfo@int at int#1\moodle at answer@rdelim{%
+\long\def\moodle at savegraderinfo@int at int#1\moodle at answer@rdelim{%
   \def\moodle at answertext{#1}
   \xa\converttohtmlmacro\xa\moodle at answertext@html\xa{\moodle at answertext}%
   %\trim at spaces@in\moodle at answertext
@@ -2830,7 +3043,8 @@
      \trim at spaces@in\moodle at answertext
      \moodle at checkfraction
      \addto at xml[2]{\moodle at answers@xml}{<answer fraction="\moodle at fraction" format="plain_text">}%
-     \addto at xml[4]{\moodle at answers@xml}{  <text>\moodle at answertext</text>}%
+     \xa\converttohtmlmacro\xa\moodle at answertext@html\xa{\moodle at answertext}%
+     \addto at xml[4]{\moodle at answers@xml}{  <text>\moodle at answertext@html</text>}%
      \ifx\moodle at feedback\@empty\relax\else
        \trim at spaces@in\moodle at feedback
        \xa\converttohtmlmacro\xa\moodle at feedback@html\xa{\moodle at feedback}%
@@ -2956,10 +3170,19 @@
 % LATEX PROCESSING
 
 \def\moodle at makelatextag@multi{%
-  \ifmoodle at multiple
-    \moodle at makelatextagbox{Multiple}\relax%
+  \ifmoodle at allornothing
+    \ifx\endmulti\endclozemulti
+      \PackageError{moodle}{Unsupported option "allornothing" for a multichoice subquestion}
+      {Please set "allornothing=false"}%
+    \else
+      \moodle at makelatextagbox{All-or-nothing}%
+    \fi
   \else
-    \moodle at makelatextagbox{Single}\relax%
+    \ifmoodle at multiple
+      \moodle at makelatextagbox{Multiple}%
+    \else
+      \moodle at makelatextagbox{Single}%
+    \fi
   \fi
   \ifmoodle at handout\else
     \ifmoodle at shuffle
@@ -2969,6 +3192,9 @@
 }
 
 \def\moodle at multi@latexprocessing{%
+  \ifmoodle at allornothing
+    \moodle at singletrue
+  \fi
   \moodle at countcorrectanswers%
   \ifmoodle at handout\NewList{answerlist}\fi
   \begin{enumerate}\moodle at obeynumberingstyle%
@@ -2990,7 +3216,7 @@
     \fi
   \fi
 }
-  \def\moodle at print@multichoice at answer#1{%
+  \long\def\moodle at print@multichoice at answer#1{%
     \let\moodle at feedback=\@empty%
     \moodle at print@multichoice at answer@int#1 \@rdelim%
   }%
@@ -2999,7 +3225,7 @@
     \setkeys{moodle}{#1}%
     \moodle at print@multichoice at answer@int at int%
   }%
-  \def\moodle at print@multichoice at answer@int at int#1#2\@rdelim{%
+  \long\def\moodle at print@multichoice at answer@int at int#1#2\@rdelim{%
     \def\test at i{#1}%
     \def\test at ii{#2}%
     \def\moodle at answertext{\item }%
@@ -3020,11 +3246,11 @@
         \ifx\moodle at fraction\@empty\relax%
           \setkeys{moodle}{fraction=0}%
         \fi
+        \moodle at checkfraction
         \ifx\moodle at fraction\@hundred%
           \trim at spaces@in\moodle at answertext%
           \g at addto@macro\moodle at answertext{$~\checkmark$}%
         \else
-          \moodle at checkfraction
           \ifdim0pt=\moodle at fraction pt\relax\else%
             \g at addto@macro\moodle at answertext{$~(\moodle at fraction\%)$}%
           \fi
@@ -3101,7 +3327,7 @@
      \fi
      \gdef\moodle at autosanctions{\strip at pt\moodle at pointsperincorrect}%
    }
-   \def\moodle at countcorrectanswers@a#1{%
+   \long\def\moodle at countcorrectanswers@a#1{%
      %The grouping is to keep key answer-specific key changes local.
      \bgroup
        \moodle at countcorrectanswers@b#1\moodle at answer@rdelim
@@ -3114,7 +3340,7 @@
        \moodle at countcorrectanswers@c%
      %\fi
    }%
-   \def\moodle at countcorrectanswers@c#1#2\moodle at answer@rdelim{%
+   \long\def\moodle at countcorrectanswers@c#1#2\moodle at answer@rdelim{%
      \def\test at i{#1}%
      \ifx\test at i\@star
        \stepcounter{moodle at numcorrectanswers}%
@@ -3150,7 +3376,15 @@
        \fi
      \fi
    }
-   \def\moodle at checkfraction{%
+ \def\moodle at checkfraction{%
+   \ifmoodle at allornothing
+     \ifnum\moodle at fraction>0%
+       \setkeys{moodle}{fraction=100}%
+     \fi
+     \ifnum\moodle at fraction<0%
+       \setkeys{moodle}{fraction=0}%
+     \fi
+   \else
      %\def\test at i{#1}%
      \setlength{\test at fraction}{\moodle at fraction pt}%
      % take the absolute value
@@ -3168,11 +3402,12 @@
      \else
        \setkeys{moodle}{fraction=\test at 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 at int#1 \moodle at answer@rdelim
     \passvalueaftergroup{\moodle at answers@xml}%
@@ -3181,9 +3416,12 @@
   \newcommand\savemultianswer at int[1][]{%
     \let\moodle at fraction\@empty%
     \setkeys{moodle}{#1}%
+    \ifmoodle at allornothing
+      \moodle at singletrue
+    \fi
     \savemultianswer at int@int%
   }%
-  \def\savemultianswer at int@int#1#2\moodle at answer@rdelim{%
+  \long\def\savemultianswer at int@int#1#2\moodle at answer@rdelim{%
     \def\test at i{#1}%
     \ifx\test at i\@star
       \ifmoodle at single
@@ -3218,9 +3456,12 @@
 
 % WRITING QUESTION TO XML FILE
 \gdef\writemultiquestion{%
-  \writetomoodle{<question type="multichoice">}%
+  
+    \writetomoodle{<question type="multichoice\ifmoodle at allornothing set\fi">}%
     \moodle at writecommondata%
-    \moodle at writesingle%
+    \ifmoodle at allornothing\else
+      \moodle at writesingle%
+    \fi
     \moodle at writeshuffle%
     \moodle at writeanswernumbering%
 }%
@@ -3241,6 +3482,7 @@
 \NewEnviron{truefalse}[2][]{%
     \bgroup
       \setkeys{moodle}{#1,questionname={#2}}%
+      \global\advance\moodle at totalmarks by \csname moodle at default grade\endcsname pt
       \expandafter\gatheritems\xa{\BODY}%
       \let\moodle at questionheader=\gatheredheader
       %First, the LaTeX processing
@@ -3248,10 +3490,7 @@
       \ifmoodle at handout
         \moodle at makelatextag@qtype{truefalse}
       \else
-        \xa\xdef\xa\test at iii\xa{\moodle at tags}%
-        \ifx\test at iii\@moodle at empty\relax\else
-          \hfill tags: \texttt{\moodle at tags}
-        \fi
+        \moodle at latex@writetags
         \par
         \noindent
         \moodle at makelatextag@qtype{truefalse}
@@ -3494,10 +3733,10 @@
     \setcounter{moodle at numcorrectanswers}{0}% Here this counter is for "questions" (items on the left column)
     \loopthroughitemswithcommand{\moodle at print@matching at answer}%
     \ifnum\c at 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 at 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 at handout
       \ifmoodle at shuffle
@@ -3645,14 +3884,10 @@
       \ifmoodle at handout
         \moodle at makelatextag@qtype{cloze}
       \else
-        \xa\xdef\xa\test at iii\xa{\moodle at tags}%
-        \ifx\test at iii\@moodle at empty\relax\else
-          \hfill tags: \texttt{\moodle at tags}
-        \fi
+        \moodle at latex@writetags
         \par
         \noindent
         \moodle at makelatextag@qtype{cloze}
-        \moodle at makelatextag@value{default grade}{\moodle at marks{\csname moodle at default grade\endcsname}}
         \moodle at makelatextag@value{penalty}{penalty}
       \fi
       \par
@@ -3685,7 +3920,11 @@
 % WRITING QUESTION TO XML FILE
 \gdef\writeclozequestion{%
   \writetomoodle{<question type="cloze">}%
-    \moodle at writecommondata%
+    \moodle at writequestionname%
+    \moodle at writequestiontext%
+    \moodle at writegeneralfeedback%
+    \moodle at writepenalty%
+    \moodle at writehidden%
     \moodle at writetags%
   \writetomoodle{</question>}%
 }%
@@ -3746,6 +3985,7 @@
       \def\endclozemulti at code{\htmlize at patchendenvironment}%
     \else
       %LaTeX version
+      \global\advance\moodle at totalmarks by \csname moodle at default grade\endcsname pt
       \moodle at questionheader% %Any introductory text just continues to be typeset.
       \par
       \noindent
@@ -3800,7 +4040,7 @@
 }[\endclozemulti at code]%
 
 
-\def\moodle at print@clozemultichoice at answer#1{%
+\long\def\moodle at print@clozemultichoice at answer#1{%
   \let\moodle at feedback=\@empty
   \moodle at print@clozemultichoice at answer@int#1 \@rdelim%
 }%
@@ -3808,7 +4048,7 @@
   \setkeys{moodle}{fraction=0,#1}%
   \moodle at print@clozemultichoice at answer@int at int%
 }%
-\def\moodle at print@clozemultichoice at answer@int at int#1#2\@rdelim{%
+\long\def\moodle at print@clozemultichoice at answer@int at int#1#2\@rdelim{%
   \def\moodle at answertext{}%
   % Case 0: "(answer) \\ \hline"
   % Case 1: "\item (answer)"
@@ -3867,7 +4107,7 @@
   \fi
 }%
 
-\def\saveclozemultichoiceanswer#1{%
+\long\def\saveclozemultichoiceanswer#1{%
   \bgroup
     \saveclozemultichoiceanswer at int#1 \moodle at answer@rdelim
   \egroup
@@ -3876,7 +4116,7 @@
   \setkeys{moodle}{fraction=0,#1}%
   \saveclozemultichoiceanswer at int@int%
 }%
-\def\saveclozemultichoiceanswer at int@int#1#2\moodle at answer@rdelim{%
+\long\def\saveclozemultichoiceanswer at int@int#1#2\moodle at answer@rdelim{%
   \def\test at i{#1}%
   \ifgatherbeginningofloop\else
     \xa\gdef\xa\clozemulti at coding\xa{\clozemulti at coding\clozetilde}% separator between answers
@@ -3929,6 +4169,7 @@
       \def\endclozenumerical at code{\htmlize at patchendenvironment}%
     \else
       %LaTeX version
+      \global\advance\moodle at totalmarks by \csname moodle at default grade\endcsname pt
       \moodle at questionheader% %Any introductory text just continues to be typeset.
       \par
       \noindent
@@ -4058,6 +4299,7 @@
       \def\endclozeshortanswer at code{\htmlize at patchendenvironment}%
     \else
       %LaTeX version
+      \global\advance\moodle at totalmarks by \csname moodle at default grade\endcsname pt
       \moodle at questionheader% %Any introductory text just continues to be typeset.
       \par
       \noindent
@@ -4358,6 +4600,7 @@
 
 \def\@lt{<}%
 \def\@gt{>}%
+\def\@dash{-}%
 
 \long\def\htmlize at recursive@i#1#2#3\htmlize at 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 at ii\@lsinglequote%
             \else
               \ifx\test at i\@rsinglequote%
-                \ifx\test at ii\@rsinglequote%
-                  %Double right quote
-                  \g at addto@macro\htmlize at output{\otherampersand rdquo;}%
+                \ifx\test at ii\@rsinglequote% Double right quote
+                  %AAedit 2021.01.06: in math mode, you should write 2 single right quotes, for second derivatives
+                  \moodle at ifmathmode{\g at addto@macro\htmlize at output{\otherampersand rsquo;\otherampersand rsquo;}}%
+                                    {\g at addto@macro\htmlize at output{\otherampersand rdquo;}}%
                   \def\htmlize at next@i{\htmlize at recursive@i#3\htmlize at rdelim@i}%
-                \else
+                \else% Single right quote
                   \g at addto@macro\htmlize at output{\otherampersand rsquo;}%
                   \def\htmlize at next@i{\htmlize at recursive@i#2#3\htmlize at rdelim@i}%
                 \fi% \ifx\test at ii\@rsinglequote%
@@ -4591,9 +4835,20 @@
                                         {\g at addto@macro\htmlize at output{>}}%
                       \def\htmlize at next@i{\htmlize at recursive@i#2#3\htmlize at rdelim@i}%
                     \else
-                      % Default case: write first token to output, call self on remaining tokens.
-                      \g at addto@macro\htmlize at output{#1}%
-                      \def\htmlize at next@i{\htmlize at recursive@i#2#3\htmlize at rdelim@i}%
+                      \ifx\test at i\@dash
+                        \ifx\test at ii\@dash% en-dash (--)
+                          \moodle at ifmathmode{\g at addto@macro\htmlize at output{--}}%
+                                    {\g at addto@macro\htmlize at output{\otherampersand ndash;}}%
+                          \def\htmlize at next@i{\htmlize at recursive@i#3\htmlize at rdelim@i}%
+                        \else
+                          \g at addto@macro\htmlize at output{-}%
+                          \def\htmlize at next@i{\htmlize at recursive@i#2#3\htmlize at rdelim@i}%
+                        \fi
+                      \else
+                        % Default case: write first token to output, call self on remaining tokens.
+                        \g at addto@macro\htmlize at output{#1}%
+                        \def\htmlize at next@i{\htmlize at recursive@i#2#3\htmlize at rdelim@i}%
+                      \fi% \ifx\test at i\@dash
                     \fi% \ifx\test at i\@gt
                   \fi% \ifx\test at i\@lt
                 \fi% \ifx\test at i\@doublequote
@@ -4927,6 +5182,7 @@
 \htmlize at record@action{\endclozemode}%
 \htmlize at record@action{\relax}%
 
+\html at action@def\%{\g at addto@macro\htmlize at output{\otherpercent}}%
 \html at action@def\#{\g at addto@macro\htmlize at output{\otherhash}}%
 \html at action@def\&{\g at addto@macro\htmlize at output{\otherampersand}}%
 \html at action@def\\{\moodle at ifmathmode{\g at addto@macro\htmlize at output{\otherbackslash\otherbackslash}}%
@@ -4971,6 +5227,9 @@
 \html at action@def\${%
      \g at addto@macro\htmlize at output{\otherdollar}%
   }%
+\html at action@def\@dquote{%
+     \g at addto@macro\htmlize at output{"}%
+  }%
 \html at action@def\clozetilde{%
     \xa\g at addto@macro\xa\htmlize at output\xa{\othertilde}%
   }%
@@ -5138,25 +5397,48 @@
       {\g at addto@macro\htmlize at output{\otherampersand#1caron\othersemicol}}%
       {\xa\g at addto@macro\htmlize at output\xa{\string\v#1}}%
 }%
+
+% Ogonek diacritics
+{\catcode`|=3\relax
+ \gdef\htmlize at ogonek{A|E|I|U|a|e|i|u|}}
+\html at action@def\k#1{%
+  \ifinlist{#1}{\htmlize at ogonek}%
+    {\g at addto@macro\htmlize at output{\otherampersand#1ogon\othersemicol}}%
+    {
+      \bgroup
+        \def\test at i{#1}%
+        \ifx\test at i\@O
+          \def\toadd{\otherampersand\otherhash490\othersemicol}%
+        \else
+          \ifx\test at i\@o
+            \def\toadd{\otherampersand\otherhash491\othersemicol}%
+          \else
+            \def\toadd{\otherbackslash\otherlbrace#1\otherrbrace}%
+          \fi
+        \fi
+        \xa\g at addto@macro\xa\htmlize at output\xa{\toadd}%
+      \egroup
+    }%
+}%
 %    \end{macrocode}
 % 
 % \subsubsection{Command sequences for Expansion}
 % 
 %    \begin{macrocode}
-\html at def\underline#1{<SPAN STYLE=\&\#34;text-decoration: underline;\&\#34;>#1</SPAN>}
+\html at def\underline#1{<SPAN STYLE=\@dquote text-decoration: underline;\@dquote>#1</SPAN>}%
 \html at def\emph#1{<EM>#1</EM>}%
 \html at def\textit#1{<I>#1</I>}%
 \html at def\textbf#1{<B>#1</B>}%
 \html at def\texttt#1{<CODE>#1</CODE>}%
-\html at def\textsc#1{<SPAN STYLE=\&\#34;font-variant: small-caps;\&\#34;>#1</SPAN>}
-\html at def\url#1{<A href=\&\#34;#1\&\#34;>#1</A>}%
-\html at def\href#1#2{<A href=\&\#34;#1\&\#34;>#2</A>}%
+\html at def\textsc#1{<SPAN STYLE=\@dquote font-variant: small-caps;\@dquote>#1</SPAN>}%
+\html at def\url#1{<A href=\@dquote #1\@dquote>#1</A>}%
+\html at def\href#1#2{<A href=\@dquote #1\@dquote>#2</A>}%
 \html at def\textsuperscript#1{<SUP>#1</SUP>}%
 \html at def\up#1{<SUP>#1</SUP>}%
 \html at def\fup#1{<SUP>#1</SUP>}%
 \html at def\textsubscript#1{<SUB>#1</SUB>}%
 \html at def\blank{____________}%
-\html at def\par{</P><P>}%
+\html at def\par{<BR/>}%
 \html at def\aa{\å}%
 \html at def\AA{\Å}%
 \html at def\ae{\æ}%
@@ -5176,6 +5458,15 @@
 \html at def\guillemotleft{\«\&\#8239;}%
 \html at def\fg{\&\#8239;\»}%
 \html at def\guillemotright{\&\#8239;\»}%
+\html at def\glqq{\„}%
+\html at def\grqq{\“}%
+\html at def\glq{\‚}%
+\html at def\grq{\‘}%
+\html at def\flqq{\«\&\#8239;}%
+\html at def\frqq{\&\#8239;\»}%
+\html at def\flq{\‹}%
+\html at def\frq{\›}%
+\html at def\dq{\"}%
 \html at def\,{\&\#8239;}%
 \html at def\thinspace{\&\#8239;}%
 \html at def\textbackslash{\&\#92;}%
@@ -5191,7 +5482,21 @@
 \htmlize at 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 at action@newcommand{htmlonly}[2][]{%
+  \g at addto@macro\htmlize at 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 at media@find#1{%
   \ifx\detokenize\@undefined\else
     \edef\Gin at extensions{\detokenize\expandafter{\Gin at 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 at 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
-
+\def\moodle at checkconversionsuccess#1#2{%
+  \IfFileExists{#1}{}{%
+    \PackageError{moodle}{#2 failed}%
+    {If the XML file is not of importance to you: use package option "draft"}%
+  }%
+}%
 \ifmoodle at tikz
-\AfterEndPreamble{%
-  %\htmlize at 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}};}%
+  \AfterEndPreamble{%
+    %\htmlize at 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 at action@newcommand{includegraphics}[2][]{%
+      \message{moodle.sty: Processing \string\includegraphics[#1]{#2} ^^J}
+      \global\advance\numpicturesread by 1\relax
+      \edef\htmlize at imagetag{<IMG SRC="data:\TikzExportMIME;base64,\csname picbaselxiv@\the\numpicturesread\endcsname">}%
+      \xa\g at addto@macro\xa\htmlize at output\xa{\htmlize at imagetag}%
+    }%
   }%
-  % externalized images must be included with the regular command
-  \pgfkeys{/pgf/images/include external/.code={\oldincludegraphics{#1}}}%
-  \html at action@newcommand{includegraphics}[2][]{%
-    \message{moodle.sty: Processing \string\includegraphics[#1]{#2} ^^J}
-    \global\advance\numpicturesread by 1\relax
-    \edef\htmlize at imagetag{<IMG SRC="data:\TikzExportMIME;base64,\csname picbaselxiv@\the\numpicturesread\endcsname">}%
-    \xa\g at addto@macro\xa\htmlize at output\xa{\htmlize at imagetag}%
-  }%
-}%
 \else
 \html at action@newcommand{includegraphics}[2][]{%
   \bgroup% The grouping is to localize the changes caused by \setkeys.
@@ -5502,6 +5823,7 @@
         \edef\cmdline{\PDFtoSVG\otherspace "\moodle at media@base\moodle at media@ext" -o "\moodle at media@base\moodle at media@ext at current" 2>/dev/null}%
         \message{moodle.sty:   Converting '#2' to SVG...^^J}%
         \xa\ShellEscape\xa{\cmdline}%
+        \moodle at checkconversionsuccess{\moodle at media@base\moodle at media@ext at current}{PDFtoSVG conversion}%
         %Next, optimize inline
         \ifwindows\else
           \edef\cmdline{\optiSVG < "\moodle at media@base\moodle at media@ext at current" >
@@ -5509,6 +5831,7 @@
            "\moodle at media@base\moodle at media@ext at current"}%
           \message{moodle.sty:   Optimizing '\moodle at media@base\moodle at media@ext at current'...^^J}%
           \xa\ShellEscape\xa{\cmdline}%
+          \moodle at checkconversionsuccess{\moodle at media@base\moodle at media@ext at current}{SVG optimization}%
         \fi
       \else% call ImageMagick
         \def\moodle at media@ext at current{.png}%
@@ -5516,10 +5839,12 @@
         \edef\cmdline{\htmlize at imagemagick@convert\otherspace "\moodle at media@base\moodle at media@ext" -resize \moodle at graphics@geometry\otherspace "\moodle at media@base\moodle at media@ext at current"}%
         \message{moodle.sty:   Converting '#2' to PNG...^^J}%
         \xa\ShellEscape\xa{\cmdline}%
+        \moodle at checkconversionsuccess{\moodle at media@base\moodle at media@ext at current}{ImageMagick conversion}%
         %Next, optimize inline
         \edef\cmdline{\optipng\otherspace "\moodle at media@base\moodle at media@ext at current"}%
         \message{moodle.sty:   Optimizing '\moodle at media@base\moodle at media@ext at current'...^^J}%
         \xa\ShellEscape\xa{\cmdline}%
+        \moodle at checkconversionsuccess{\moodle at media@base\moodle at media@ext at 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 at int{#1}{#2}
+  \xa\ShellEscape\xa{\cmdline}%
+  \moodle at 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 at 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 at 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 at 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,17 +5944,23 @@
       \ifpdfoutput% tex engines defaulting to PDF output (pdflatex, xelatex, lualatex)
         \def\ExportTikz{ \message{moodle.sty: Converting picture '\moodle at basename.pdf' to SVG...^^J}%
                          \edef\cmdline{\PDFtoSVG\otherspace "\moodle at basename.pdf" -o "\moodle at basename\TikzExportExtension" 2>/dev/null}%
-                         \xa\ShellEscape\xa{\cmdline}}%
+                         \xa\ShellEscape\xa{\cmdline}%
+                         \moodle at checkconversionsuccess{\moodle at basename\TikzExportExtension}{PDFtoSVG conversion}%
+                       }%
       \else % latex
         \def\ExportTikz{ \message{moodle.sty: Converting picture '\moodle at basename.ps' to SVG...^^J}%
                          \edef\cmdline{\PDFtoSVG\otherspace "\moodle at basename.ps" -o "\moodle at basename\TikzExportExtension" 2>/dev/null}%
-                         \xa\ShellEscape\xa{\cmdline}}%
+                         \xa\ShellEscape\xa{\cmdline}%
+                         \moodle at checkconversionsuccess{\moodle at basename\TikzExportExtension}{PStoSVG conversion}%
+                       }%
       \fi
       \def\OptimizeExport{ \message{moodle.sty:   Optimizing '\moodle at basename.svg'...^^J}%
                            \edef\cmdline{\optiSVG\otherspace < "\moodle at basename\TikzExportExtension" >
                                          "\moodle at basename.tmp.svg" && mv "\moodle at basename.tmp.svg"
                                          "\moodle at basename\TikzExportExtension" }%
-                           \xa\ShellEscape\xa{\cmdline}}%
+                           \xa\ShellEscape\xa{\cmdline}%
+                           \moodle at checkconversionsuccess{\moodle at basename\TikzExportExtension}{SVG optimization}%
+                         }%
     \else
       \def\TikzExportExtension{.png}%
       \def\TikzExportMIME{image/png}%
@@ -5638,15 +5967,21 @@
       \ifpdfoutput% tex engines defaulting to PDF output (pdflatex, xelatex, lualatex)
         \def\ExportTikz{ \message{moodle.sty: Converting picture '\moodle at basename.pdf' to PNG...^^J}%
                          \edef\gscmdline{\gs\otherspace -sOutputFile=\moodle at basename\TikzExportExtension\otherspace -r150 \moodle at basename.pdf}%
-                         \xa\ShellEscape\xa{\gscmdline}}%
+                         \xa\ShellEscape\xa{\gscmdline}%
+                         \moodle at checkconversionsuccess{\moodle at basename\TikzExportExtension}{Ghostscript conversion}%
+                       }%
       \else % latex
         \def\ExportTikz{ \message{moodle.sty: Converting picture '\moodle at basename.ps' to PNG...^^J}%
                          \edef\gscmdline{\gs\otherspace -sOutputFile=\moodle at basename\TikzExportExtension\otherspace -r150 \\moodle at basename.ps}%
-                         \xa\ShellEscape\xa{\gscmdline}}%
+                         \xa\ShellEscape\xa{\gscmdline}%
+                         \moodle at checkconversionsuccess{\moodle at basename\TikzExportExtension}{Ghostscript conversion}%
+                       }%
       \fi
       \def\OptimizeExport{ \message{moodle.sty:   Optimizing '\moodle at basename.png'...^^J}%
                            \edef\cmdline{\optipng\otherspace \moodle at basename\TikzExportExtension}%
-                           \xa\ShellEscape\xa{\cmdline}}%
+                           \xa\ShellEscape\xa{\cmdline}%
+                           \moodle at checkconversionsuccess{\moodle at basename\TikzExportExtension}{PNG optimization}%
+                         }%
     \fi
     \let\moodle at oldtikzpicture=\tikzpicture
     %The following code lets us run things *before* the normal \begin{tikzpicture}.
@@ -5678,6 +6013,7 @@
         \ExportTikz
         \OptimizeExport
         \ConvertToBaseLXIV{\moodle at basename}{\TikzExportExtension}%
+        \IfFileExists{\moodle at 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 at babel@german at 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 at babel@german at warn}{\relax}%
+  \@ifpackagewith{babel}{austrian}{\moodle at babel@german at warn}{\relax}%
+  \@ifpackagewith{babel}{swissgerman}{\moodle at babel@german at warn}{\relax}%
+  \@ifpackagewith{babel}{swissgerman.toss}{\moodle at babel@german at warn}{\relax}%
+  \@ifpackagewith{babel}{ngerman}{\moodle at babel@german at warn}{\relax}%
+  \@ifpackagewith{babel}{naustrian}{\moodle at babel@german at warn}{\relax}%
+  \@ifpackagewith{babel}{nswissgerman}{\moodle at babel@german at warn}{\relax}%
+  \@ifpackagewith{babel}{nswissgerman.toss}{\moodle at babel@german at 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}'.}%

Modified: trunk/Master/texmf-dist/tex/latex/moodle/moodle.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/moodle/moodle.sty	2021-02-08 19:16:29 UTC (rev 57682)
+++ trunk/Master/texmf-dist/tex/latex/moodle/moodle.sty	2021-02-08 21:58:24 UTC (rev 57683)
@@ -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 at draftmode
 \newif\ifmoodle at handout
 \newif\ifmoodle at 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 at stamp -->}%
     \def\moodle at stamp{running on \platformname}%
-    \g at addto@macro{\moodle at stamp}{ with the package moodle v0.8 }%
+    \g at addto@macro{\moodle at stamp}{ with the package moodle v0.9 }%
     \writetomoodle{<!-- \moodle at stamp -->}%
   \fi
   \immediate\write\moodle at outfile{}%
@@ -200,6 +207,7 @@
 }{}%
 }}%
 \newcommand*\@enumeratename{enumerate}%
+\newdimen\moodle at totalmarks \moodle at totalmarks=0pt%
 \newenvironment{quiz}[2][]{%
   \setkeys{moodle}{#1}%
   \gdef\setcategory##1{%
@@ -206,7 +214,7 @@
     % 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 at warning{Empty question list}}%
+      \def\@noitemerr{}%\@latex at warning{Empty question list}
       \end{enumerate}%
     \fi
     \gdef\moodle at currentcategory{##1}%
@@ -227,7 +235,7 @@
     \begin{enumerate}%
   }%
   \gdef\setsubcategory##1{%
-    \def\@noitemerr{\@latex at warning{Empty question list}}%
+    \def\@noitemerr{}%\@latex at warning{Empty question list}
     \end{enumerate}%
     \moodle at write@category at xml{\moodle at currentcategory/##1}%
     \ifmoodle at section
@@ -248,6 +256,7 @@
   \setcategory{#2}%
 }{%
   \end{enumerate}%
+  \emph{Total of marks: \strip at pt\moodle at totalmarks}%
   \let\setcategory\relax
   \let\setsubcategory\relax
 }%
@@ -327,21 +336,29 @@
   }%
 }%
 
-\def\generate at moodle@write at tags#1{%
-  % #1 = NAME for \moodle at writeNAME
-  % #3 = what, exactly, to write
-  \xa\gdef\csname moodle at writetags\endcsname{%
-    %\xa\xa\xdef\xa\xa\ds\xa\xa{Encountered '\string #1'}\show\ds
-    \xa\xdef\xa\test at iii\xa{\moodle at tags}%
-    \ifx\test at iii\@moodle at empty\relax\else
-      \xa\converttohtmlmacro\xa\moodle at htmltowrite\xa{\moodle at tags}%
-      \writetomoodle[2]{  <tags>}%
+\def\moodle at writetags{%
+  \xa\xdef\xa\test at iii\xa{\moodle at tags}%
+  \ifx\test at iii\@moodle at empty\relax\else
+    \writetomoodle[2]{  <tags>}%
+    \renewcommand*{\do}[1]{%
+      \def\moodle at tagtext{##1}%
+      \xa\converttohtmlmacro\xa\moodle at htmltowrite\xa{\moodle at tagtext}%
       \writetomoodle[4]{    <tag><text><![CDATA[\moodle at htmltowrite]]></text></tag>}%
-      \writetomoodle[2]{  </tags>}%
-    \fi
-  }%
+    }
+    \xa\docsvlist\xa{\moodle at tags}%
+    \writetomoodle[2]{  </tags>}%
+  \fi
 }%
-
+\newif\ifmoodle at firsttag
+\moodle at firsttagtrue
+\def\moodle at latex@writetags{%
+  \xa\xdef\xa\test at iii\xa{\moodle at tags}%
+  \ifx\test at iii\@moodle at empty\relax\else
+    \hfill tags: %
+    \renewcommand*{\do}[1]{\ifmoodle at firsttag\moodle at firsttagfalse\else, \fi\texttt{##1}}%
+    \xa\docsvlist\xa{\test at iii}%
+  \fi
+}%
 %% QUESTIONNAME
       \define at cmdkey{moodle}[moodle@]{questionname}{}%
 \generate at moodle@write at html@noptag{questionname}<name>{\moodle at questionname}%
@@ -407,8 +424,7 @@
       %which defines a "tag" (i.e., keyword) for the question.
       %Key calls like [tags={random}] set \moodle at tags.
       \define at cmdkey{moodle}[moodle@]{tags}[]{}%
-      \generate at moodle@write at tags{\csname moodle at tags\endcsname}%
-      \moodleset{tags}%
+      \moodleset{tags={}}%
 
 %% FRACTION -- how much this answer is worth out of 100 percent
       \define at cmdkey{moodle}[moodle@]{fraction}[100]{}%
@@ -431,6 +447,10 @@
       \generate at moodle@write at code*{shuffle}<shuffleanswers>{\ifmoodle at shuffle 1\else 0\fi}%
       \moodleset{shuffle=true}%
 
+%% ALLORNOTHING -- for multichoice with multiple answers where all the points are given
+      \define at 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 at totalmarks by \csname moodle at default grade\endcsname pt
       \expandafter\gatheritems\xa{\BODY}%
       \let\moodle at questionheader=\gatheredheader
       %First, the LaTeX processing
@@ -686,10 +707,7 @@
       \ifmoodle at handout
         \moodle at makelatextag@qtype{#1}
       \else
-        \xa\xdef\xa\test at iii\xa{\moodle at tags}%
-        \ifx\test at iii\@moodle at empty\relax\else
-          \hfill tags: \texttt{\moodle at tags}
-        \fi
+        \moodle at latex@writetags
         \par
         \noindent
         \moodle at 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 at questiontext=\BODY
-    \trim at spaces@in\moodle at questiontext
-    \ifx\moodle at questiontext\@empty\relax\else%
-      %First, the LaTeX processing.
-      \item \textbf{\moodle at questionname}
-      \ifmoodle at handout\else
-        \xa\xdef\xa\test at iii\xa{\moodle at tags}%
-        \ifx\test at iii\@moodle at empty\relax\else
-          \hfill tags: \texttt{\moodle at 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 at questiontext=\BODY
+      \trim at spaces@in\moodle at questiontext
+      \ifx\moodle at questiontext\@empty\relax\else%
+        %First, the LaTeX processing.
+        \item \textbf{\moodle at questionname}
+        \ifmoodle at handout\else
+          \moodle at latex@writetags
+          \par
+          \noindent
         \fi
-        \par
+        \moodle at makelatextag@qtype{description}\par
         \noindent
-      \fi
-      \moodle at makelatextag@qtype{description}\par
-      \noindent
-      \moodle at questiontext\par
-      \ifmoodle at handout\else
-        \ifx\moodle at feedback\@empty\relax\else
-          \fbox{\parbox{\linewidth}{\emph{\moodle at feedback}}}%
+        \moodle at questiontext\par
+        \ifmoodle at handout\else
+          \ifx\moodle at feedback\@empty\relax\else
+            \fbox{\parbox{\linewidth}{\emph{\moodle at feedback}}}%
+          \fi
         \fi
+        %Now, writing information to memory.
+        \@moodle at ifgeneratexml{%
+          \writetomoodle{<question type="description">}%
+          \moodle at writecommondata
+          \moodle at writetags%
+          \writetomoodle{</question>}%
+        }{}%
       \fi
-      %Now, writing information to memory.
-      \@moodle at ifgeneratexml{%
-        \writetomoodle{<question type="description">}%
-        \moodle at writecommondata
-        \moodle at writetags%
-        \writetomoodle{</question>}%
-      }{}%
-    \fi
-  \egroup
+    \egroup
+  }%
 }%
 \def\moodle at 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 at questionheader
   \ifnum\c at numgathereditems>0\relax
     \begin{itemize} \setlength\itemsep{0pt}\setlength\parskip{0pt}%
       \loopthroughitemswithcommand{\moodle at print@essay at answer}%
@@ -772,6 +789,8 @@
 \NewEnviron{essay}[2][]{%
   \bgroup
     \setkeys{moodle}{#1,questionname={#2}}%
+    \global\advance\moodle at totalmarks by \csname moodle at default grade\endcsname pt
+    \moodle at checkresponsefieldlines
     \expandafter\gatheritems\expandafter{\BODY}%
     \let\moodle at questionheader=\gatheredheader
     %First, the LaTeX processing.
@@ -779,10 +798,7 @@
       \ifmoodle at handout
         \moodle at makelatextag@qtype{essay}
       \else
-        \xa\xdef\xa\test at iii\xa{\moodle at tags}%
-        \ifx\test at iii\@moodle at empty\relax\else
-          \hfill tags: \texttt{\moodle at tags}
-        \fi
+        \moodle at latex@writetags
         \par
         \noindent
         \moodle at makelatextag@qtype{essay}
@@ -792,7 +808,9 @@
       \fi
       \par
       \noindent
-      \ifx\moodle at responsetemplate\@empty\relax\else%
+      \moodle at questionheader
+      \long\def\@lempty{}%
+      \ifx\moodle at responsetemplate\@lempty\else
         \par\noindent \emph{Template:}
         \par\fbox{\parbox{\linewidth}{\moodle at responsetemplate}}\par
       \fi
@@ -831,6 +849,31 @@
   \egroup
 }%
 
+\def\moodle at checkresponsefieldlines{%
+  \newcount\a\a=\number\csname moodle at 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 at response field lines\endcsname% equality holds if we had 5, 10, 15, 20, 25, 30, or 40
+  \else
+    \ifnum\csname moodle at response field lines\endcsname>5%
+      \ifnum\csname moodle at 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 at 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 at numgathereditems=0\relax through its \else and \fi,
@@ -875,11 +918,11 @@
     \moodle at writeattachmentsrequired%
 }%
 
-\def\moodle at print@essay at answer#1{%
+\long\def\moodle at print@essay at answer#1{%
     \item #1%
 }%
 
-\def\moodle at savegraderinfo#1{%
+\long\def\moodle at savegraderinfo#1{%
   %\def\ds{#1}\show\ds
   \bgroup
     \moodle at savegraderinfo@int#1\moodle at answer@rdelim
@@ -890,7 +933,7 @@
   \setkeys{moodle}{fraction=0,#1}%
   \moodle at savegraderinfo@int at int%
 }%
-\def\moodle at savegraderinfo@int at int#1\moodle at answer@rdelim{%
+\long\def\moodle at savegraderinfo@int at int#1\moodle at answer@rdelim{%
   \def\moodle at answertext{#1}
   \xa\converttohtmlmacro\xa\moodle at answertext@html\xa{\moodle at answertext}%
   %\trim at spaces@in\moodle at answertext
@@ -962,7 +1005,8 @@
      \trim at spaces@in\moodle at answertext
      \moodle at checkfraction
      \addto at xml[2]{\moodle at answers@xml}{<answer fraction="\moodle at fraction" format="plain_text">}%
-     \addto at xml[4]{\moodle at answers@xml}{  <text>\moodle at answertext</text>}%
+     \xa\converttohtmlmacro\xa\moodle at answertext@html\xa{\moodle at answertext}%
+     \addto at xml[4]{\moodle at answers@xml}{  <text>\moodle at answertext@html</text>}%
      \ifx\moodle at feedback\@empty\relax\else
        \trim at spaces@in\moodle at feedback
        \xa\converttohtmlmacro\xa\moodle at feedback@html\xa{\moodle at feedback}%
@@ -1065,10 +1109,19 @@
 
 
 \def\moodle at makelatextag@multi{%
-  \ifmoodle at multiple
-    \moodle at makelatextagbox{Multiple}\relax%
+  \ifmoodle at allornothing
+    \ifx\endmulti\endclozemulti
+      \PackageError{moodle}{Unsupported option "allornothing" for a multichoice subquestion}
+      {Please set "allornothing=false"}%
+    \else
+      \moodle at makelatextagbox{All-or-nothing}%
+    \fi
   \else
-    \moodle at makelatextagbox{Single}\relax%
+    \ifmoodle at multiple
+      \moodle at makelatextagbox{Multiple}%
+    \else
+      \moodle at makelatextagbox{Single}%
+    \fi
   \fi
   \ifmoodle at handout\else
     \ifmoodle at shuffle
@@ -1078,6 +1131,9 @@
 }
 
 \def\moodle at multi@latexprocessing{%
+  \ifmoodle at allornothing
+    \moodle at singletrue
+  \fi
   \moodle at countcorrectanswers%
   \ifmoodle at handout\NewList{answerlist}\fi
   \begin{enumerate}\moodle at obeynumberingstyle%
@@ -1099,7 +1155,7 @@
     \fi
   \fi
 }
-  \def\moodle at print@multichoice at answer#1{%
+  \long\def\moodle at print@multichoice at answer#1{%
     \let\moodle at feedback=\@empty%
     \moodle at print@multichoice at answer@int#1 \@rdelim%
   }%
@@ -1108,7 +1164,7 @@
     \setkeys{moodle}{#1}%
     \moodle at print@multichoice at answer@int at int%
   }%
-  \def\moodle at print@multichoice at answer@int at int#1#2\@rdelim{%
+  \long\def\moodle at print@multichoice at answer@int at int#1#2\@rdelim{%
     \def\test at i{#1}%
     \def\test at ii{#2}%
     \def\moodle at answertext{\item }%
@@ -1129,11 +1185,11 @@
         \ifx\moodle at fraction\@empty\relax%
           \setkeys{moodle}{fraction=0}%
         \fi
+        \moodle at checkfraction
         \ifx\moodle at fraction\@hundred%
           \trim at spaces@in\moodle at answertext%
           \g at addto@macro\moodle at answertext{$~\checkmark$}%
         \else
-          \moodle at checkfraction
           \ifdim0pt=\moodle at fraction pt\relax\else%
             \g at addto@macro\moodle at answertext{$~(\moodle at fraction\%)$}%
           \fi
@@ -1209,7 +1265,7 @@
      \fi
      \gdef\moodle at autosanctions{\strip at pt\moodle at pointsperincorrect}%
    }
-   \def\moodle at countcorrectanswers@a#1{%
+   \long\def\moodle at countcorrectanswers@a#1{%
      %The grouping is to keep key answer-specific key changes local.
      \bgroup
        \moodle at countcorrectanswers@b#1\moodle at answer@rdelim
@@ -1222,7 +1278,7 @@
        \moodle at countcorrectanswers@c%
      %\fi
    }%
-   \def\moodle at countcorrectanswers@c#1#2\moodle at answer@rdelim{%
+   \long\def\moodle at countcorrectanswers@c#1#2\moodle at answer@rdelim{%
      \def\test at i{#1}%
      \ifx\test at i\@star
        \stepcounter{moodle at numcorrectanswers}%
@@ -1258,7 +1314,15 @@
        \fi
      \fi
    }
-   \def\moodle at checkfraction{%
+ \def\moodle at checkfraction{%
+   \ifmoodle at allornothing
+     \ifnum\moodle at fraction>0%
+       \setkeys{moodle}{fraction=100}%
+     \fi
+     \ifnum\moodle at fraction<0%
+       \setkeys{moodle}{fraction=0}%
+     \fi
+   \else
      %\def\test at i{#1}%
      \setlength{\test at fraction}{\moodle at fraction pt}%
      % take the absolute value
@@ -1276,9 +1340,10 @@
      \else
        \setkeys{moodle}{fraction=\test at fractionmatched}%
      \fi
-   }
+   \fi
+ }
 
-\def\savemultianswer#1{%
+\long\def\savemultianswer#1{%
   \bgroup
     \savemultianswer at int#1 \moodle at answer@rdelim
     \passvalueaftergroup{\moodle at answers@xml}%
@@ -1287,9 +1352,12 @@
   \newcommand\savemultianswer at int[1][]{%
     \let\moodle at fraction\@empty%
     \setkeys{moodle}{#1}%
+    \ifmoodle at allornothing
+      \moodle at singletrue
+    \fi
     \savemultianswer at int@int%
   }%
-  \def\savemultianswer at int@int#1#2\moodle at answer@rdelim{%
+  \long\def\savemultianswer at int@int#1#2\moodle at answer@rdelim{%
     \def\test at i{#1}%
     \ifx\test at i\@star
       \ifmoodle at single
@@ -1323,9 +1391,12 @@
   }%
 
 \gdef\writemultiquestion{%
-  \writetomoodle{<question type="multichoice">}%
+
+    \writetomoodle{<question type="multichoice\ifmoodle at allornothing set\fi">}%
     \moodle at writecommondata%
-    \moodle at writesingle%
+    \ifmoodle at allornothing\else
+      \moodle at writesingle%
+    \fi
     \moodle at writeshuffle%
     \moodle at writeanswernumbering%
 }%
@@ -1334,6 +1405,7 @@
 \NewEnviron{truefalse}[2][]{%
     \bgroup
       \setkeys{moodle}{#1,questionname={#2}}%
+      \global\advance\moodle at totalmarks by \csname moodle at default grade\endcsname pt
       \expandafter\gatheritems\xa{\BODY}%
       \let\moodle at questionheader=\gatheredheader
       %First, the LaTeX processing
@@ -1341,10 +1413,7 @@
       \ifmoodle at handout
         \moodle at makelatextag@qtype{truefalse}
       \else
-        \xa\xdef\xa\test at iii\xa{\moodle at tags}%
-        \ifx\test at iii\@moodle at empty\relax\else
-          \hfill tags: \texttt{\moodle at tags}
-        \fi
+        \moodle at latex@writetags
         \par
         \noindent
         \moodle at makelatextag@qtype{truefalse}
@@ -1572,10 +1641,10 @@
     \setcounter{moodle at numcorrectanswers}{0}% Here this counter is for "questions" (items on the left column)
     \loopthroughitemswithcommand{\moodle at print@matching at answer}%
     \ifnum\c at 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 at 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 at handout
       \ifmoodle at shuffle
@@ -1690,14 +1759,10 @@
       \ifmoodle at handout
         \moodle at makelatextag@qtype{cloze}
       \else
-        \xa\xdef\xa\test at iii\xa{\moodle at tags}%
-        \ifx\test at iii\@moodle at empty\relax\else
-          \hfill tags: \texttt{\moodle at tags}
-        \fi
+        \moodle at latex@writetags
         \par
         \noindent
         \moodle at makelatextag@qtype{cloze}
-        \moodle at makelatextag@value{default grade}{\moodle at marks{\csname moodle at default grade\endcsname}}
         \moodle at makelatextag@value{penalty}{penalty}
       \fi
       \par
@@ -1729,7 +1794,11 @@
 
 \gdef\writeclozequestion{%
   \writetomoodle{<question type="cloze">}%
-    \moodle at writecommondata%
+    \moodle at writequestionname%
+    \moodle at writequestiontext%
+    \moodle at writegeneralfeedback%
+    \moodle at writepenalty%
+    \moodle at writehidden%
     \moodle at writetags%
   \writetomoodle{</question>}%
 }%
@@ -1785,6 +1854,7 @@
       \def\endclozemulti at code{\htmlize at patchendenvironment}%
     \else
       %LaTeX version
+      \global\advance\moodle at totalmarks by \csname moodle at default grade\endcsname pt
       \moodle at questionheader% %Any introductory text just continues to be typeset.
       \par
       \noindent
@@ -1837,7 +1907,7 @@
   \egroup%
 }[\endclozemulti at code]%
 
-\def\moodle at print@clozemultichoice at answer#1{%
+\long\def\moodle at print@clozemultichoice at answer#1{%
   \let\moodle at feedback=\@empty
   \moodle at print@clozemultichoice at answer@int#1 \@rdelim%
 }%
@@ -1845,7 +1915,7 @@
   \setkeys{moodle}{fraction=0,#1}%
   \moodle at print@clozemultichoice at answer@int at int%
 }%
-\def\moodle at print@clozemultichoice at answer@int at int#1#2\@rdelim{%
+\long\def\moodle at print@clozemultichoice at answer@int at int#1#2\@rdelim{%
   \def\moodle at answertext{}%
   % Case 0: "(answer) \\ \hline"
   % Case 1: "\item (answer)"
@@ -1904,7 +1974,7 @@
   \fi
 }%
 
-\def\saveclozemultichoiceanswer#1{%
+\long\def\saveclozemultichoiceanswer#1{%
   \bgroup
     \saveclozemultichoiceanswer at int#1 \moodle at answer@rdelim
   \egroup
@@ -1913,7 +1983,7 @@
   \setkeys{moodle}{fraction=0,#1}%
   \saveclozemultichoiceanswer at int@int%
 }%
-\def\saveclozemultichoiceanswer at int@int#1#2\moodle at answer@rdelim{%
+\long\def\saveclozemultichoiceanswer at int@int#1#2\moodle at answer@rdelim{%
   \def\test at i{#1}%
   \ifgatherbeginningofloop\else
     \xa\gdef\xa\clozemulti at coding\xa{\clozemulti at coding\clozetilde}% separator between answers
@@ -1961,6 +2031,7 @@
       \def\endclozenumerical at code{\htmlize at patchendenvironment}%
     \else
       %LaTeX version
+      \global\advance\moodle at totalmarks by \csname moodle at default grade\endcsname pt
       \moodle at questionheader% %Any introductory text just continues to be typeset.
       \par
       \noindent
@@ -2082,6 +2153,7 @@
       \def\endclozeshortanswer at code{\htmlize at patchendenvironment}%
     \else
       %LaTeX version
+      \global\advance\moodle at totalmarks by \csname moodle at default grade\endcsname pt
       \moodle at questionheader% %Any introductory text just continues to be typeset.
       \par
       \noindent
@@ -2298,6 +2370,7 @@
 
 \def\@lt{<}%
 \def\@gt{>}%
+\def\@dash{-}%
 
 \long\def\htmlize at recursive@i#1#2#3\htmlize at 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 at ii\@lsinglequote%
             \else
               \ifx\test at i\@rsinglequote%
-                \ifx\test at ii\@rsinglequote%
-                  %Double right quote
-                  \g at addto@macro\htmlize at output{\otherampersand rdquo;}%
+                \ifx\test at ii\@rsinglequote% Double right quote
+                  %AAedit 2021.01.06: in math mode, you should write 2 single right quotes, for second derivatives
+                  \moodle at ifmathmode{\g at addto@macro\htmlize at output{\otherampersand rsquo;\otherampersand rsquo;}}%
+                                    {\g at addto@macro\htmlize at output{\otherampersand rdquo;}}%
                   \def\htmlize at next@i{\htmlize at recursive@i#3\htmlize at rdelim@i}%
-                \else
+                \else% Single right quote
                   \g at addto@macro\htmlize at output{\otherampersand rsquo;}%
                   \def\htmlize at next@i{\htmlize at recursive@i#2#3\htmlize at rdelim@i}%
                 \fi% \ifx\test at ii\@rsinglequote%
@@ -2529,9 +2603,20 @@
                                         {\g at addto@macro\htmlize at output{>}}%
                       \def\htmlize at next@i{\htmlize at recursive@i#2#3\htmlize at rdelim@i}%
                     \else
-                      % Default case: write first token to output, call self on remaining tokens.
-                      \g at addto@macro\htmlize at output{#1}%
-                      \def\htmlize at next@i{\htmlize at recursive@i#2#3\htmlize at rdelim@i}%
+                      \ifx\test at i\@dash
+                        \ifx\test at ii\@dash% en-dash (--)
+                          \moodle at ifmathmode{\g at addto@macro\htmlize at output{--}}%
+                                    {\g at addto@macro\htmlize at output{\otherampersand ndash;}}%
+                          \def\htmlize at next@i{\htmlize at recursive@i#3\htmlize at rdelim@i}%
+                        \else
+                          \g at addto@macro\htmlize at output{-}%
+                          \def\htmlize at next@i{\htmlize at recursive@i#2#3\htmlize at rdelim@i}%
+                        \fi
+                      \else
+                        % Default case: write first token to output, call self on remaining tokens.
+                        \g at addto@macro\htmlize at output{#1}%
+                        \def\htmlize at next@i{\htmlize at recursive@i#2#3\htmlize at rdelim@i}%
+                      \fi% \ifx\test at i\@dash
                     \fi% \ifx\test at i\@gt
                   \fi% \ifx\test at i\@lt
                 \fi% \ifx\test at i\@doublequote
@@ -2785,6 +2870,7 @@
 \htmlize at record@action{\endclozemode}%
 \htmlize at record@action{\relax}%
 
+\html at action@def\%{\g at addto@macro\htmlize at output{\otherpercent}}%
 \html at action@def\#{\g at addto@macro\htmlize at output{\otherhash}}%
 \html at action@def\&{\g at addto@macro\htmlize at output{\otherampersand}}%
 \html at action@def\\{\moodle at ifmathmode{\g at addto@macro\htmlize at output{\otherbackslash\otherbackslash}}%
@@ -2829,6 +2915,9 @@
 \html at action@def\${%
      \g at addto@macro\htmlize at output{\otherdollar}%
   }%
+\html at action@def\@dquote{%
+     \g at addto@macro\htmlize at output{"}%
+  }%
 \html at action@def\clozetilde{%
     \xa\g at addto@macro\xa\htmlize at output\xa{\othertilde}%
   }%
@@ -2989,20 +3078,42 @@
       {\g at addto@macro\htmlize at output{\otherampersand#1caron\othersemicol}}%
       {\xa\g at addto@macro\htmlize at output\xa{\string\v#1}}%
 }%
-\html at def\underline#1{<SPAN STYLE=\&\#34;text-decoration: underline;\&\#34;>#1</SPAN>}
+
+{\catcode`|=3\relax
+ \gdef\htmlize at ogonek{A|E|I|U|a|e|i|u|}}
+\html at action@def\k#1{%
+  \ifinlist{#1}{\htmlize at ogonek}%
+    {\g at addto@macro\htmlize at output{\otherampersand#1ogon\othersemicol}}%
+    {
+      \bgroup
+        \def\test at i{#1}%
+        \ifx\test at i\@O
+          \def\toadd{\otherampersand\otherhash490\othersemicol}%
+        \else
+          \ifx\test at i\@o
+            \def\toadd{\otherampersand\otherhash491\othersemicol}%
+          \else
+            \def\toadd{\otherbackslash\otherlbrace#1\otherrbrace}%
+          \fi
+        \fi
+        \xa\g at addto@macro\xa\htmlize at output\xa{\toadd}%
+      \egroup
+    }%
+}%
+\html at def\underline#1{<SPAN STYLE=\@dquote text-decoration: underline;\@dquote>#1</SPAN>}%
 \html at def\emph#1{<EM>#1</EM>}%
 \html at def\textit#1{<I>#1</I>}%
 \html at def\textbf#1{<B>#1</B>}%
 \html at def\texttt#1{<CODE>#1</CODE>}%
-\html at def\textsc#1{<SPAN STYLE=\&\#34;font-variant: small-caps;\&\#34;>#1</SPAN>}
-\html at def\url#1{<A href=\&\#34;#1\&\#34;>#1</A>}%
-\html at def\href#1#2{<A href=\&\#34;#1\&\#34;>#2</A>}%
+\html at def\textsc#1{<SPAN STYLE=\@dquote font-variant: small-caps;\@dquote>#1</SPAN>}%
+\html at def\url#1{<A href=\@dquote #1\@dquote>#1</A>}%
+\html at def\href#1#2{<A href=\@dquote #1\@dquote>#2</A>}%
 \html at def\textsuperscript#1{<SUP>#1</SUP>}%
 \html at def\up#1{<SUP>#1</SUP>}%
 \html at def\fup#1{<SUP>#1</SUP>}%
 \html at def\textsubscript#1{<SUB>#1</SUB>}%
 \html at def\blank{____________}%
-\html at def\par{</P><P>}%
+\html at def\par{<BR/>}%
 \html at def\aa{\å}%
 \html at def\AA{\Å}%
 \html at def\ae{\æ}%
@@ -3022,6 +3133,15 @@
 \html at def\guillemotleft{\«\&\#8239;}%
 \html at def\fg{\&\#8239;\»}%
 \html at def\guillemotright{\&\#8239;\»}%
+\html at def\glqq{\„}%
+\html at def\grqq{\“}%
+\html at def\glq{\‚}%
+\html at def\grq{\‘}%
+\html at def\flqq{\«\&\#8239;}%
+\html at def\frqq{\&\#8239;\»}%
+\html at def\flq{\‹}%
+\html at def\frq{\›}%
+\html at def\dq{\"}%
 \html at def\,{\&\#8239;}%
 \html at def\thinspace{\&\#8239;}%
 \html at def\textbackslash{\&\#92;}%
@@ -3033,6 +3153,18 @@
 \htmlize at record@action\inlinemathrightdelim
 \htmlize at record@action\displaymathrightdelim
 
+\newcommand\htmlonly[2][]{#1}%
+\html at action@newcommand{htmlonly}[2][]{%
+  \g at addto@macro\htmlize at 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 at media@find#1{%
   \ifx\detokenize\@undefined\else
     \edef\Gin at extensions{\detokenize\expandafter{\Gin at extensions}}%
@@ -3184,7 +3316,10 @@
       }%
     }%
     \DeclareGraphicsAlien{.gif}{.png}{\htmlize at imagemagick@convert\otherspace '\SourceFile[0]' \OutputFile}%
-  }{}%
+  }{
+    \newcommand\includegraphics[2][]{\PackageError{moodle}{"\string\includegraphics" is not defined}%
+                                          {Add "\string\usepackage{graphicx}" to you preamble.}}{}%}%
+  }%
 }%
 \define at cmdkeys{moodle at includegraphics}[moodle at graphics@]{ppi}
 \define at cmdkey{moodle}[moodle at 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
-
+\def\moodle at checkconversionsuccess#1#2{%
+  \IfFileExists{#1}{}{%
+    \PackageError{moodle}{#2 failed}%
+    {If the XML file is not of importance to you: use package option "draft"}%
+  }%
+}%
 \ifmoodle at tikz
-\AfterEndPreamble{%
-  %\htmlize at 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}};}%
+  \AfterEndPreamble{%
+    %\htmlize at 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 at action@newcommand{includegraphics}[2][]{%
+      \message{moodle.sty: Processing \string\includegraphics[#1]{#2} ^^J}
+      \global\advance\numpicturesread by 1\relax
+      \edef\htmlize at imagetag{<IMG SRC="data:\TikzExportMIME;base64,\csname picbaselxiv@\the\numpicturesread\endcsname">}%
+      \xa\g at addto@macro\xa\htmlize at output\xa{\htmlize at imagetag}%
+    }%
   }%
-  % externalized images must be included with the regular command
-  \pgfkeys{/pgf/images/include external/.code={\oldincludegraphics{#1}}}%
-  \html at action@newcommand{includegraphics}[2][]{%
-    \message{moodle.sty: Processing \string\includegraphics[#1]{#2} ^^J}
-    \global\advance\numpicturesread by 1\relax
-    \edef\htmlize at imagetag{<IMG SRC="data:\TikzExportMIME;base64,\csname picbaselxiv@\the\numpicturesread\endcsname">}%
-    \xa\g at addto@macro\xa\htmlize at output\xa{\htmlize at imagetag}%
-  }%
-}%
 \else
 \html at action@newcommand{includegraphics}[2][]{%
   \bgroup% The grouping is to localize the changes caused by \setkeys.
@@ -3284,6 +3424,7 @@
         \edef\cmdline{\PDFtoSVG\otherspace "\moodle at media@base\moodle at media@ext" -o "\moodle at media@base\moodle at media@ext at current" 2>/dev/null}%
         \message{moodle.sty:   Converting '#2' to SVG...^^J}%
         \xa\ShellEscape\xa{\cmdline}%
+        \moodle at checkconversionsuccess{\moodle at media@base\moodle at media@ext at current}{PDFtoSVG conversion}%
         %Next, optimize inline
         \ifwindows\else
           \edef\cmdline{\optiSVG < "\moodle at media@base\moodle at media@ext at current" >
@@ -3291,6 +3432,7 @@
            "\moodle at media@base\moodle at media@ext at current"}%
           \message{moodle.sty:   Optimizing '\moodle at media@base\moodle at media@ext at current'...^^J}%
           \xa\ShellEscape\xa{\cmdline}%
+          \moodle at checkconversionsuccess{\moodle at media@base\moodle at media@ext at current}{SVG optimization}%
         \fi
       \else% call ImageMagick
         \def\moodle at media@ext at current{.png}%
@@ -3298,10 +3440,12 @@
         \edef\cmdline{\htmlize at imagemagick@convert\otherspace "\moodle at media@base\moodle at media@ext" -resize \moodle at graphics@geometry\otherspace "\moodle at media@base\moodle at media@ext at current"}%
         \message{moodle.sty:   Converting '#2' to PNG...^^J}%
         \xa\ShellEscape\xa{\cmdline}%
+        \moodle at checkconversionsuccess{\moodle at media@base\moodle at media@ext at current}{ImageMagick conversion}%
         %Next, optimize inline
         \edef\cmdline{\optipng\otherspace "\moodle at media@base\moodle at media@ext at current"}%
         \message{moodle.sty:   Optimizing '\moodle at media@base\moodle at media@ext at current'...^^J}%
         \xa\ShellEscape\xa{\cmdline}%
+        \moodle at checkconversionsuccess{\moodle at media@base\moodle at media@ext at 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 at int{#1}{#2}
+  \xa\ShellEscape\xa{\cmdline}%
+  \moodle at 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 at 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 at 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 at 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,17 +3527,23 @@
       \ifpdfoutput% tex engines defaulting to PDF output (pdflatex, xelatex, lualatex)
         \def\ExportTikz{ \message{moodle.sty: Converting picture '\moodle at basename.pdf' to SVG...^^J}%
                          \edef\cmdline{\PDFtoSVG\otherspace "\moodle at basename.pdf" -o "\moodle at basename\TikzExportExtension" 2>/dev/null}%
-                         \xa\ShellEscape\xa{\cmdline}}%
+                         \xa\ShellEscape\xa{\cmdline}%
+                         \moodle at checkconversionsuccess{\moodle at basename\TikzExportExtension}{PDFtoSVG conversion}%
+                       }%
       \else % latex
         \def\ExportTikz{ \message{moodle.sty: Converting picture '\moodle at basename.ps' to SVG...^^J}%
                          \edef\cmdline{\PDFtoSVG\otherspace "\moodle at basename.ps" -o "\moodle at basename\TikzExportExtension" 2>/dev/null}%
-                         \xa\ShellEscape\xa{\cmdline}}%
+                         \xa\ShellEscape\xa{\cmdline}%
+                         \moodle at checkconversionsuccess{\moodle at basename\TikzExportExtension}{PStoSVG conversion}%
+                       }%
       \fi
       \def\OptimizeExport{ \message{moodle.sty:   Optimizing '\moodle at basename.svg'...^^J}%
                            \edef\cmdline{\optiSVG\otherspace < "\moodle at basename\TikzExportExtension" >
                                          "\moodle at basename.tmp.svg" && mv "\moodle at basename.tmp.svg"
                                          "\moodle at basename\TikzExportExtension" }%
-                           \xa\ShellEscape\xa{\cmdline}}%
+                           \xa\ShellEscape\xa{\cmdline}%
+                           \moodle at checkconversionsuccess{\moodle at basename\TikzExportExtension}{SVG optimization}%
+                         }%
     \else
       \def\TikzExportExtension{.png}%
       \def\TikzExportMIME{image/png}%
@@ -3402,15 +3550,21 @@
       \ifpdfoutput% tex engines defaulting to PDF output (pdflatex, xelatex, lualatex)
         \def\ExportTikz{ \message{moodle.sty: Converting picture '\moodle at basename.pdf' to PNG...^^J}%
                          \edef\gscmdline{\gs\otherspace -sOutputFile=\moodle at basename\TikzExportExtension\otherspace -r150 \moodle at basename.pdf}%
-                         \xa\ShellEscape\xa{\gscmdline}}%
+                         \xa\ShellEscape\xa{\gscmdline}%
+                         \moodle at checkconversionsuccess{\moodle at basename\TikzExportExtension}{Ghostscript conversion}%
+                       }%
       \else % latex
         \def\ExportTikz{ \message{moodle.sty: Converting picture '\moodle at basename.ps' to PNG...^^J}%
                          \edef\gscmdline{\gs\otherspace -sOutputFile=\moodle at basename\TikzExportExtension\otherspace -r150 \\moodle at basename.ps}%
-                         \xa\ShellEscape\xa{\gscmdline}}%
+                         \xa\ShellEscape\xa{\gscmdline}%
+                         \moodle at checkconversionsuccess{\moodle at basename\TikzExportExtension}{Ghostscript conversion}%
+                       }%
       \fi
       \def\OptimizeExport{ \message{moodle.sty:   Optimizing '\moodle at basename.png'...^^J}%
                            \edef\cmdline{\optipng\otherspace \moodle at basename\TikzExportExtension}%
-                           \xa\ShellEscape\xa{\cmdline}}%
+                           \xa\ShellEscape\xa{\cmdline}%
+                           \moodle at checkconversionsuccess{\moodle at basename\TikzExportExtension}{PNG optimization}%
+                         }%
     \fi
     \let\moodle at oldtikzpicture=\tikzpicture
     %The following code lets us run things *before* the normal \begin{tikzpicture}.
@@ -3432,6 +3586,7 @@
         \ExportTikz
         \OptimizeExport
         \ConvertToBaseLXIV{\moodle at basename}{\TikzExportExtension}%
+        \IfFileExists{\moodle at 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 at VerbatimInput\xa{\csname minted at infileHTML\the\c at moodle@pygmentizecounter\endcsname}%
 }%
 \AtBeginDocument{%
+  \def\moodle at babel@german at 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 at babel@german at warn}{\relax}%
+  \@ifpackagewith{babel}{austrian}{\moodle at babel@german at warn}{\relax}%
+  \@ifpackagewith{babel}{swissgerman}{\moodle at babel@german at warn}{\relax}%
+  \@ifpackagewith{babel}{swissgerman.toss}{\moodle at babel@german at warn}{\relax}%
+  \@ifpackagewith{babel}{ngerman}{\moodle at babel@german at warn}{\relax}%
+  \@ifpackagewith{babel}{naustrian}{\moodle at babel@german at warn}{\relax}%
+  \@ifpackagewith{babel}{nswissgerman}{\moodle at babel@german at warn}{\relax}%
+  \@ifpackagewith{babel}{nswissgerman.toss}{\moodle at babel@german at 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}'.}%



More information about the tex-live-commits mailing list.