mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-12934 temporary fix for grade items of activities without proper course module record; merged from MOODLE_19_STABLE
This commit is contained in:
parent
828af11cf2
commit
2be2c4c2cd
@ -852,7 +852,9 @@ class grade_structure {
|
||||
$iteminstance = $element['object']->iteminstance;
|
||||
|
||||
if ($withlink and $itemtype=='mod' and $iteminstance and $itemmodule) {
|
||||
$cm = get_coursemodule_from_instance($itemmodule, $iteminstance, $this->courseid);
|
||||
if (!$cm = get_coursemodule_from_instance($itemmodule, $iteminstance, $this->courseid)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$dir = $CFG->dirroot.'/mod/'.$itemmodule;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user