From: skodak Date: Tue, 5 Feb 2008 13:11:48 +0000 (+0000) Subject: MDL-12518 fixed restore of grade calculations; merged from MOODLE_19_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=cba498f0904f47d2ae3abb798a1f597b7802efa9;p=moodle.git MDL-12518 fixed restore of grade calculations; merged from MOODLE_19_STABLE --- diff --git a/lib/grade/grade_item.php b/lib/grade/grade_item.php index 9f94529c3f..f4f47ddfa1 100644 --- a/lib/grade/grade_item.php +++ b/lib/grade/grade_item.php @@ -964,7 +964,7 @@ class grade_item extends grade_object { */ // first detect if we need to change calculation formula from [[idnumber]] to ##giXXX## (after backup, etc.) - if (!$this->calculation_normalized and preg_match('/##gi\d+##/', $this->calculation)) { + if (!$this->calculation_normalized and strpos('[[', $this->calculation) !== 0) { $this->set_calculation($this->calculation); }