From cba498f0904f47d2ae3abb798a1f597b7802efa9 Mon Sep 17 00:00:00 2001 From: skodak Date: Tue, 5 Feb 2008 13:11:48 +0000 Subject: [PATCH] MDL-12518 fixed restore of grade calculations; merged from MOODLE_19_STABLE --- lib/grade/grade_item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.39.5