Skip to content

Commit

Permalink
Merge branch 'MDL-75308' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Sep 13, 2022
2 parents b420ce7 + 91ae2c2 commit 402136e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions admin/tool/task/renderer.php
Expand Up @@ -213,10 +213,9 @@ public function last_run_time(scheduled_task $task): string {
* @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');
Expand Down
2 changes: 1 addition & 1 deletion lib/classes/task/task_base.php
Expand Up @@ -254,7 +254,7 @@ public function is_component_enabled(): bool {
return true;
} else {
$plugininfo = core_plugin_manager::instance()->get_plugin_info($component);
return $plugininfo && $plugininfo->is_enabled();
return $plugininfo && ($plugininfo->is_enabled() !== false);
}
}
}

0 comments on commit 402136e

Please sign in to comment.