MDL-12518 fixed restore of grade calculations

This commit is contained in:
skodak
2008-02-05 13:11:09 +00:00
parent f6ea800797
commit 782532955d
+1 -1
View File
@@ -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);
}