aboutsummaryrefslogtreecommitdiff
path: root/displayformula.php
diff options
context:
space:
mode:
authorJean-Michel Vedrine <vedrine@vedrine.org>2014-06-19 14:08:36 +0200
committerJean-Michel Vedrine <vedrine@vedrine.org>2014-06-19 14:10:07 +0200
commita7171d6dacb463ce0cc45beb23a31fe2c1684141 (patch)
treec22952d52d7b1e00ad6389d2c2c35080029e170a /displayformula.php
parent8055f6eddd71cf562d5fb7b6528bc082ef508085 (diff)
CONTRIB-5128 hints not working
Diffstat (limited to 'displayformula.php')
-rw-r--r--displayformula.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/displayformula.php b/displayformula.php
index dc495d6..dd49486 100644
--- a/displayformula.php
+++ b/displayformula.php
@@ -43,14 +43,18 @@ try {
$texexp='';
} else {
$exp = $p->parse($m[2], $vars);
- $texexp = '$$'.$exp->tex().'$$';
+ if ($CFG->qtype_algebra_texdelimiters == 'old') {
+ $texexp = '$$'.$exp->tex().'$$';
+ } else {
+ $texexp = '\['.$exp->tex().'\]';
+ }
}
} catch (Exception $e) {
$texexp = get_string('parseerror', 'qtype_algebra', $e->getMessage());
}
$formatoptions = new stdClass;
$formatoptions->para = false;
-$PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
+$PAGE->set_context(context_system::instance());
$text = format_text($texexp, FORMAT_MOODLE, $formatoptions);
?>
<html>