$width = "width=\"$width\"";
}
if ($imagefile) {
+ if (!file_exists("$CFG->dataroot/$CFG->algebrafilterdir/$imagefile") && isadmin()) {
+ $output .= "<a href=\"$CFG->wwwroot/$CFG->algebrafilterdir/algebradebug.php\">";
+ } else {
+ $output .= "<a href=\"javascript:prompt('The TeX code used to generate this formula is:','";
+ $output .= preg_replace('/(\\\)/',"\$1\$1",$tex) . "')\">";
+ }
$output .= "<img border=\"0\" $title $height $width src=\"";
if ($CFG->slasharguments) { // Use this method if possible for better caching
$output .= "$CFG->wwwroot/$CFG->algebrafilterdir/pix.php/$imagefile";
$output .= "$CFG->wwwroot/$CFG->algebrafilterdir/pix.php?file=$imagefile";
}
$output .= "\" />";
+ $output .= "</a>";
} else {
$output .= "Error: must pass URL or course";
}
$width = "width=\"$width\"";
}
if ($imagefile) {
+ if (!file_exists("$CFG->dataroot/$CFG->texfilterdir/$imagefile") && isadmin()) {
+ $output .= "<a href=\"$CFG->wwwroot/$CFG->texfilterdir/texdebug.php\">";
+ } else {
+ $output .= "<a href=\"javascript:prompt('The TeX code used to generate this formula is:','";
+ $output .= preg_replace('/(\\\)/',"\$1\$1",$tex) . "')\">";
+ }
$output .= "<img border=\"0\" $title $height $width src=\"";
if ($CFG->slasharguments) { // Use this method if possible for better caching
$output .= "$CFG->wwwroot/$CFG->texfilterdir/pix.php/$imagefile";
$output .= "$CFG->wwwroot/$CFG->texfilterdir/pix.php?file=$imagefile";
}
$output .= "\" />";
+ $output .= "</a>";
} else {
$output .= "Error: must pass URL or course";
}