From: fiedorow Date: Sat, 27 Mar 2004 18:33:30 +0000 (+0000) Subject: Expression image now links to TeX source or debug script X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d633b4eb271b144f26a1be9b5b67cedd21aeaab3;p=moodle.git Expression image now links to TeX source or debug script --- diff --git a/filter/algebra/filter.php b/filter/algebra/filter.php index 8e82deb706..f8dbe85d1f 100644 --- a/filter/algebra/filter.php +++ b/filter/algebra/filter.php @@ -73,6 +73,12 @@ function string_file_picture_algebra($imagefile, $tex= "", $height="", $width="" $width = "width=\"$width\""; } if ($imagefile) { + if (!file_exists("$CFG->dataroot/$CFG->algebrafilterdir/$imagefile") && isadmin()) { + $output .= "wwwroot/$CFG->algebrafilterdir/algebradebug.php\">"; + } else { + $output .= ""; + } $output .= "slasharguments) { // Use this method if possible for better caching $output .= "$CFG->wwwroot/$CFG->algebrafilterdir/pix.php/$imagefile"; @@ -80,6 +86,7 @@ function string_file_picture_algebra($imagefile, $tex= "", $height="", $width="" $output .= "$CFG->wwwroot/$CFG->algebrafilterdir/pix.php?file=$imagefile"; } $output .= "\" />"; + $output .= ""; } else { $output .= "Error: must pass URL or course"; } diff --git a/filter/tex/filter.php b/filter/tex/filter.php index 72574390fd..906e1068e5 100644 --- a/filter/tex/filter.php +++ b/filter/tex/filter.php @@ -68,6 +68,12 @@ function string_file_picture_tex($imagefile, $tex= "", $height="", $width="") { $width = "width=\"$width\""; } if ($imagefile) { + if (!file_exists("$CFG->dataroot/$CFG->texfilterdir/$imagefile") && isadmin()) { + $output .= "wwwroot/$CFG->texfilterdir/texdebug.php\">"; + } else { + $output .= ""; + } $output .= "slasharguments) { // Use this method if possible for better caching $output .= "$CFG->wwwroot/$CFG->texfilterdir/pix.php/$imagefile"; @@ -75,6 +81,7 @@ function string_file_picture_tex($imagefile, $tex= "", $height="", $width="") { $output .= "$CFG->wwwroot/$CFG->texfilterdir/pix.php?file=$imagefile"; } $output .= "\" />"; + $output .= ""; } else { $output .= "Error: must pass URL or course"; }