diff options
author | Jean-Michel Vedrine <vedrine@vedrine.org> | 2014-06-19 14:08:36 +0200 |
---|---|---|
committer | Jean-Michel Vedrine <vedrine@vedrine.org> | 2014-06-19 14:10:07 +0200 |
commit | a7171d6dacb463ce0cc45beb23a31fe2c1684141 (patch) | |
tree | c22952d52d7b1e00ad6389d2c2c35080029e170a /displayformula.php | |
parent | 8055f6eddd71cf562d5fb7b6528bc082ef508085 (diff) |
CONTRIB-5128 hints not working
Diffstat (limited to 'displayformula.php')
-rw-r--r-- | displayformula.php | 8 |
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> |