summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ximera/src/graded.dtx
blob: 24ec67052d44b318d154a16da459a3516951e088 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
% \subsection{Grading by points}
% \DescribeEnv{graded}{The |graded| environment does nothing in latex,
% but in html, it wraps the activities in a div in order to assign
% some weight to them for grading.}
%    \begin{macrocode}
%<*classXourse>
\newenvironment{graded}[1]{}{}
%</classXourse>
%    \end{macrocode}
% So indeed this environment in html wraps the activities in a div in
% order to assign some number of points to them.
%    \begin{macrocode}
%<*htXourse>
\renewenvironment{graded}[1]{%
\ifvmode \IgnorePar\fi \EndP\HCode{<div class="graded" data-weight="#1">}\IgnoreIndent%
}{
\ifvmode \IgnorePar\fi \EndP\HCode{</div>}\IgnoreIndent%
}
%</htXourse>
%    \end{macrocode}