diff --git a/filter/algebra/filter.php b/filter/algebra/filter.php index c20a8e4c224..aa66f4abebb 100644 --- a/filter/algebra/filter.php +++ b/filter/algebra/filter.php @@ -40,7 +40,7 @@ function string_file_picture_algebra($imagefile, $tex= "", $height="", $width="", $align="middle") { // Given the path to a picture file in a course, or a URL, // this function includes the picture in the page. - global $CFG; + global $CFG, $OUTPUT; $output = ""; $origtex = $tex; @@ -76,7 +76,7 @@ function string_file_picture_algebra($imagefile, $tex= "", $height="", $width="" $link = '/filter/algebra/displaytex.php?'.urlencode($tex); $action = new popup_action('click', $link, 'popup', array('height'=>300,'width'=>240)); } - $output .= $OUTPUT->action_link($link, $anchortagcontents, $action, array('title'=>'TeX')); + $output .= $OUTPUT->action_link($link, $anchorcontents, $action, array('title'=>'TeX')); } else { $output .= "Error: must pass URL or course"; diff --git a/filter/tex/filter.php b/filter/tex/filter.php index e77a8fae2ac..3992a614997 100644 --- a/filter/tex/filter.php +++ b/filter/tex/filter.php @@ -37,7 +37,7 @@ ///////////////////////////////////////////////////////////////////////////// function string_file_picture_tex($imagefile, $tex= "", $height="", $width="", $align="middle", $alt='') { - global $CFG; + global $CFG, $OUTPUT; if ($alt==='') { $alt = s($tex); @@ -93,7 +93,7 @@ function string_file_picture_tex($imagefile, $tex= "", $height="", $width="", $a $link = '/filter/tex/displaytex.php?'.urlencode($tex); $action = new popup_action('click', $link, 'popup', array('height'=>300,'width'=>240)); } - $output .= $OUTPUT->action_link($link, $anchortagcontents, $action, array('title'=>'TeX')); + $output .= $OUTPUT->action_link($link, $anchorcontents, $action, array('title'=>'TeX')); } else { $output .= "Error: must pass URL or course"; }