MDL-55161 assign: Check for existence of gradebook feedback plugin

This commit is contained in:
Michael Aherne
2016-07-13 09:03:44 +01:00
parent e25d3383b9
commit 4063900e2b
+4
View File
@@ -7444,6 +7444,10 @@ class assign {
// Check if default gradebook feedback is visible and enabled.
$gradebookfeedbackplugin = $this->get_feedback_plugin_by_type($gradebookplugin);
if (empty($gradebookfeedbackplugin)) {
return false;
}
if ($gradebookfeedbackplugin->is_visible() && $gradebookfeedbackplugin->is_enabled()) {
return true;
}