[Aimmath-commit] moodle/mod/math_assignment pdfgen.php,1.13,1.14
Brought to you by:
gustav_delius,
npstrick
|
From: <gus...@us...> - 2003-09-30 22:41:35
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv18370/mod/math_assignment
Modified Files:
pdfgen.php
Log Message:
implements \specials in the tex to mark parts of the question that should be only for the screen or only for the sheet.
Index: pdfgen.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/pdfgen.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** pdfgen.php 29 Sep 2003 19:21:59 -0000 1.13
--- pdfgen.php 30 Sep 2003 22:41:26 -0000 1.14
***************
*** 74,78 ****
// attempt to register them automatically
if (!math_assignment_register_with_aim($server, $subject)) {
! error(get_string("nooutput", "math_assignment"), "view.php?id=$cm->id");
}
// retry
--- 74,78 ----
// attempt to register them automatically
if (!math_assignment_register_with_aim($server, $subject)) {
! error(get_string("nooutput", "math_assignment"), "view.php?id=$cm->id");
}
// retry
***************
*** 245,252 ****
"<latex>,~~~ {\bf $2: } </latex>",$data);
! // delete AiM syntax hints (identified by \small)
! $data = preg_replace("/\\\\small[^}]*./",
"",$data);
// We might at some point want to replace input box by ....
//preg_match_all("/<latex>([\s\S]*)?<\/latex>/", $data, $matches);
--- 245,258 ----
"<latex>,~~~ {\bf $2: } </latex>",$data);
! // delete things meant for the screen only
! // these are delimited by \special{<screen>} .... \special{</screen>}
! $data = preg_replace('/\\\special{<screen>}([\s\S]*)?\\\special{<\/screen>}/',
"",$data);
+ // preserve things meant for the sheet only
+ // these are delimited by \special{<sheet> ... </sheet>}
+ $data = preg_replace('/\\\special{<sheet>([\s\S]*)?<\/sheet>}/',
+ "\$1",$data);
+
// We might at some point want to replace input box by ....
//preg_match_all("/<latex>([\s\S]*)?<\/latex>/", $data, $matches);
|