From a7171d6dacb463ce0cc45beb23a31fe2c1684141 Mon Sep 17 00:00:00 2001 From: Jean-Michel Vedrine Date: Thu, 19 Jun 2014 14:08:36 +0200 Subject: CONTRIB-5128 hints not working --- displayformula.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'displayformula.php') 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); ?> -- cgit v1.2.3