Skip to content

Commit dd0d2a4

Browse files
committed
Removed legacy cron function
This change removes the old cron function in lib.php which is no longer needed in Moodle 4.2.
1 parent c56897f commit dd0d2a4

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

lib.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,6 @@
6969
define('TOOL_OBJECTFS_DELETE_EXTERNAL_TRASH', 1);
7070
define('TOOL_OBJECTFS_DELETE_EXTERNAL_FULL', 2);
7171

72-
// Legacy cron function.
73-
function tool_objectfs_cron() {
74-
mtrace('RUNNING legacy cron objectfs');
75-
global $CFG;
76-
if ($CFG->branch <= 26) {
77-
// Unlike the task system, we do not get fine grained control over
78-
// when tasks/manipulators run. Every cron we just run all the manipulators.
79-
(new manipulator_builder())->execute_all();
80-
81-
\tool_objectfs\local\report\objectfs_report::cleanup_reports();
82-
\tool_objectfs\local\report\objectfs_report::generate_status_report();
83-
}
84-
85-
return true;
86-
}
87-
8872
/**
8973
* Sends a plugin file to the browser.
9074
* @param $course

tests/local/tasks_test.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,6 @@ protected function tearDown(): void {
3232
ob_end_clean();
3333
}
3434

35-
public function test_run_legacy_cron() {
36-
$config = manager::get_objectfs_config();
37-
$config->enabletasks = true;
38-
manager::set_objectfs_config($config);
39-
$this->assertTrue(tool_objectfs_cron());
40-
}
41-
4235
public function test_run_scheduled_tasks() {
4336
global $CFG;
4437
// If tasks not implemented.

0 commit comments

Comments
 (0)