Merge branch 'MDL-75308-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE

This commit is contained in:
Jun Pataleta
2022-09-14 05:32:57 +08:00
2 changed files with 3 additions and 4 deletions
+2 -3
View File
@@ -213,10 +213,9 @@ class tool_task_renderer extends plugin_renderer_base {
* @return string HTML.
*/
public function next_run_time(scheduled_task $task): string {
$plugininfo = core_plugin_manager::instance()->get_plugin_info($task->get_component());
$nextrun = $task->get_next_run_time();
if ($plugininfo && $plugininfo->is_enabled() === false && !$task->get_run_if_component_disabled()) {
if (!$task->is_component_enabled() && !$task->get_run_if_component_disabled()) {
$nextrun = get_string('plugindisabled', 'tool_task');
} else if ($task->get_disabled()) {
$nextrun = get_string('taskdisabled', 'tool_task');
+1 -1
View File
@@ -247,7 +247,7 @@ abstract class task_base {
return true;
} else {
$plugininfo = core_plugin_manager::instance()->get_plugin_info($component);
return $plugininfo && $plugininfo->is_enabled();
return $plugininfo && ($plugininfo->is_enabled() !== false);
}
}
}