diff --git a/classes/local/manager/workflow_manager.php b/classes/local/manager/workflow_manager.php index 25c09b82..f0bd8a92 100644 --- a/classes/local/manager/workflow_manager.php +++ b/classes/local/manager/workflow_manager.php @@ -249,7 +249,7 @@ public static function activate_workflow($workflowid) { */ private static function reset_manual_workflow_cache() { $cache = \cache::make('tool_lifecycle', 'application'); - $cache->delete('manualworkflowexists'); + $cache->delete('workflowactive'); } /** diff --git a/lib.php b/lib.php index e54a64bf..ff877af5 100644 --- a/lib.php +++ b/lib.php @@ -44,14 +44,14 @@ function tool_lifecycle_extend_navigation_course($navigation, $course, $context) } $cache = cache::make('tool_lifecycle', 'application'); - if ($cache->has('manualworkflowexists')) { - $manualwfexists = $cache->get('manualworkflowexists'); + if ($cache->has('workflowactive')) { + $wfexists = $cache->get('workflowactive'); } else { - $manualwfexists = $DB->record_exists_select('tool_lifecycle_workflow', 'manual = 1 AND timeactive IS NOT NULL'); - $cache->set('manualworkflowsexist', $manualwfexists); + $wfexists = $DB->record_exists_select('tool_lifecycle_workflow', 'timeactive IS NOT NULL'); + $cache->set('workflowactive', $wfexists); } - if (!$manualwfexists) { + if (!$wfexists) { return null; }