I'm compiling this simple quiz under LaTex TexShop 4.27
\documentclass[12pt]{article}
\usepackage{moodle}
\def\EN{{\bf A}}
\def\XV{3}
\def\YV{4}
%---------------------------
\begin{document}
\begin{quiz}{MyQuiz}
\begin{essay}{Question A}
Report on study case \EN\ with numerical values:
\begin{center}
\begin{tabular}{|c|c|} \hline
$x$ & $y$ \\ \hline
\XV & \YV \\ \hline
\end{tabular}
\end{center}
\item Case \EN\ with numerical values \XV,\YV
\end{essay}
\end{quiz}
\end{document}
and I get a nice pdf file. But inside the moodle.xml file the defined values don't appear anywhere and the body of the question is:
<text><![CDATA[<p>Report on study case \EN with numerical values: <CENTER>\begin {tabular}{|c|c|} \hline \(x\) & \(y\) <BR/> \hline \XV & \YV <BR/> \hline \end {tabular}</CENTER> </p>]]></text>
producing this ugly result inside moodle:
What is happening with my definitions and the tabular environment ?.
\def
to\newcommand
and it all compiles fine.tabular
is not among them, neither are, of course, your personal commands.