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

This commit is contained in:
Michael Aherne 2016-07-08 10:48:00 +01:00
parent 5a1728df39
commit b4beaed931

View File

@ -7978,6 +7978,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;
}