[Aimmath-commit] moodle/mod/math_assignment pdfgen.php,1.8,1.9
Brought to you by:
gustav_delius,
npstrick
From: <gus...@us...> - 2003-09-25 23:02:46
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment In directory sc8-pr-cvs1:/tmp/cvs-serv18831/mod/math_assignment Modified Files: pdfgen.php Log Message: small updates Index: pdfgen.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/pdfgen.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** pdfgen.php 24 Sep 2003 23:57:28 -0000 1.8 --- pdfgen.php 25 Sep 2003 23:02:42 -0000 1.9 *************** *** 129,133 **** foreach ($questions as $question) { //$latex = preg_replace("/(?<!newcommand\{)\\\aimquestion/",addslashes(math_assignment_aim_to_latex($question,$type)),$latex,1); ! $latex = str_replace_once("\aimquestion",math_assignment_aim_to_latex($question,$type),$latex); } --- 129,133 ---- foreach ($questions as $question) { //$latex = preg_replace("/(?<!newcommand\{)\\\aimquestion/",addslashes(math_assignment_aim_to_latex($question,$type)),$latex,1); ! $latex = str_replace_once("\aimquestion","$\\sphericalangle$ ".math_assignment_aim_to_latex($question,$type),$latex); } *************** *** 179,183 **** // The "class=\"solu is there to save this from being erased in the next step below $data = preg_replace("/The correct answer is ([A-Z])/", ! "class=\"solu<latex>\n\n\\noindent{ Right Answer: } $1. </latex>",$data); // Remove anything else up to the solution or the next question or the end of file --- 179,187 ---- // The "class=\"solu is there to save this from being erased in the next step below $data = preg_replace("/The correct answer is ([A-Z])/", ! "class=\"solu<latex>\n\\noindent Right Answer: {\bf $1}. </latex>",$data); ! // Keep the answer to multiple response questions ! // The "class=\"solu is there to save this from being erased in the next step below ! $data = preg_replace("/The correct answer is (\{[A-Z](,[A-Z])*\})/", ! "class=\"solu<latex>\n\\noindent Right Answer: {\bf $1}. </latex>",$data); // Remove anything else up to the solution or the next question or the end of file *************** *** 195,204 **** // replace radio buttons ! $data = preg_replace("/(type=\"radio\"[^\/]*value=\")([A-Z])\"/", ! "<latex>\n\n {\bf $2 } </latex>",$data); // replace checkboxes by diamonds ! $data = preg_replace("/(type=\"checkbox\"[^\/]*value=\")([A-Z])\"/", ! "<latex>\n\n {\bf $2 } </latex>",$data); // delete AiM syntax hints (identified by \small) --- 199,212 ---- // replace radio buttons ! $data = preg_replace("/(type=\"radio\"[^\/]*value=\")([A])\"/", ! "<latex>\n\n {\bf $2: } </latex>",$data); ! $data = preg_replace("/(type=\"radio\"[^\/]*value=\")([B-Z])\"/", ! "<latex>,~~~ {\bf $2: } </latex>",$data); // replace checkboxes by diamonds ! $data = preg_replace("/(type=\"checkbox\"[^\/]*value=\")([A])\"/", ! "<latex>\n\n {\bf $2: } </latex>",$data); ! $data = preg_replace("/(type=\"checkbox\"[^\/]*value=\")([B-Z])\"/", ! "<latex>,~~~ {\bf $2: } </latex>",$data); // delete AiM syntax hints (identified by \small) |