mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
MDL-13863 detect missing idnumbers in formulas after restore; merged from MOODLE_19_STABLE
This commit is contained in:
parent
67881aa801
commit
9c9a3259ee
@ -1589,6 +1589,10 @@ class grade_item extends grade_object {
|
||||
|
||||
// prepare formula and init maths library
|
||||
$formula = preg_replace('/##(gi\d+)##/', '\1', $this->calculation);
|
||||
if (strpos($formula, '[[') !== false) {
|
||||
// missing item
|
||||
return false;
|
||||
}
|
||||
$this->formula = new calc_formula($formula);
|
||||
|
||||
// where to look for final grades?
|
||||
|
Loading…
x
Reference in New Issue
Block a user