mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
MDL-12518 fixed restore of grade calculations; merged from MOODLE_19_STABLE
This commit is contained in:
parent
76b570d602
commit
cba498f090
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user