From e81f94dec9b10e3f254ca855c4f8772283771093 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 6 Aug 2012 23:52:11 -0500 Subject: [PATCH] addition for dragmath editor: a new image/link is shown next to answer box for each ans_rule --- macros/PGbasicmacros.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/macros/PGbasicmacros.pl b/macros/PGbasicmacros.pl index 6a7d6969ff..eb635c3886 100644 --- a/macros/PGbasicmacros.pl +++ b/macros/PGbasicmacros.pl @@ -340,10 +340,23 @@ sub NAMED_ANS_RULE { my $tcol = $col/2 > 3 ? $col/2 : 3; ## get max $tcol = $tcol < 40 ? $tcol : 40; ## get min + # added for dragmath formula editor + my $dragmath = 0; + $dragmath = $main::envir{DragMath}; + $dragmath = 0 unless defined ($dragmath); + + my $add_html = ''; + if ($dragmath == 1){ + $add_html = qq!!; + } + + # end of addition for dragmath + MODES( TeX => "\\mbox{\\parbox[t]{${tcol}ex}{\\hrulefill}}", Latex2HTML => qq!\\begin{rawhtml}\\end{rawhtml}!, HTML => qq!!. + $add_html. # added for dragmath qq!! ); }