mirror of
https://github.com/moodle/moodle.git
synced 2025-07-16 20:06:30 +02:00
MDL-28643 Fix debugging message when deleting activity with grade completion
This commit is contained in:
@ -794,10 +794,16 @@ class grade_grade extends grade_object {
|
|||||||
// Get course-module
|
// Get course-module
|
||||||
$cm = get_coursemodule_from_instance($this->grade_item->itemmodule,
|
$cm = get_coursemodule_from_instance($this->grade_item->itemmodule,
|
||||||
$this->grade_item->iteminstance, $this->grade_item->courseid);
|
$this->grade_item->iteminstance, $this->grade_item->courseid);
|
||||||
|
// If the course-module doesn't exist, display a warning...
|
||||||
if (!$cm) {
|
if (!$cm) {
|
||||||
debugging("Couldn't find course-module for module
|
// ...unless the grade is being deleted in which case it's likely
|
||||||
'{$this->grade_item->itemmodule}', instance '{$this->grade_item->iteminstance}',
|
// that the course-module was just deleted too, so that's okay.
|
||||||
course '{$this->grade_item->courseid}'");
|
if (!$deleted) {
|
||||||
|
debugging("Couldn't find course-module for module '" .
|
||||||
|
$this->grade_item->itemmodule . "', instance '" .
|
||||||
|
$this->grade_item->iteminstance . "', course '" .
|
||||||
|
$this->grade_item->courseid . "'");
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user