project: Moodle
summary: Remove any legacy cron from Moodle standard distribution
description: Remove any non legacy cron from Moodle standard distribution Since it is deprecated as of The orginal goal was to do this for the 3.5 release, but in the end, some of the subtasks below were not done until Moodle 3.7. Some (not all) areas that use it are - ++ Use of legacy cron is deprecated (repository_dropbox_cron). Please use scheduled tasks. ++ ++ Use of legacy cron is deprecated (repository_filesystem_cron). Please use scheduled tasks. ++ ++ Use of legacy cron is deprecated (\block_rss_client::cron()). Please use scheduled tasks. ++ ++ Use of legacy cron is deprecated (workshop_cron). Please use scheduled tasks. ++ ++ Use of legacy cron is deprecated (workshopallocation_scheduled_cron). Please use scheduled tasks. ++ ++ Use of legacy cron is deprecated (quiz_cron). Please use scheduled tasks. ++ ++ Use of legacy cron is deprecated (quiz_statistics_cron). Please use scheduled tasks. ++ ++ Use of legacy cron is deprecated (chat_cron). Please use scheduled tasks. ++ ++ Use of legacy cron is deprecated (assign_cron). Please use scheduled tasks. ++ ++ Use of legacy cron is deprecated (enrol_cohort). Please use scheduled tasks. ++ ++ Use of legacy cron is deprecated (enrol_self). Please use scheduled tasks. ++ Use of legacy cron is deprecated (enrol_manual). Please use scheduled tasks. ++

1.summary: Quiz uses legacy cron
description: quiz module is still using legacy cron task to close open events. This probably should be moved over to the Scheduled Tasks system
2.summary: Standard enrolment plugins use legacy cron
description: As described in we need to convert legacy cron functions to scheduled tasks
3.summary: Standard block plugins use legacy cron
description: As described in we need to convert legacy cron functions to scheduled tasks The blocks rss_client and recent_activity are still using legacy cron.
4.summary: mod_assign uses legacy cron
description: mod_assign module is still using legacy cron. This must be moved over to the Scheduled Tasks system
5.summary: Wiki uses legacy cron
description: mod_wiki module is still using legacy cron. This must be moved over to the Scheduled Tasks system.
6.summary: Workshop uses legacy cron
description: Workshop module and some of their subcomponents, like allocations, are still using legacy cron. This must be moved over to the Scheduled Tasks system.
7.summary: Some repositories use legacy cron
description: Dropbox and filesystem repositories are still using legacy cron. This must be moved over to the Scheduled Tasks system.
8.summary: Chat uses legacy cron
description: Chat module is still using legacy cron. This must be moved over to the Scheduled Tasks system.
9.summary: Mnet auth uses legacy cron
description: auth_mnet plugin is still using legacy cron. This must be moved over to the Scheduled Tasks system.
10.summary: Filestorage uses legacy cron
description: lib/filestorage/file_storage.php, lib/filestorage/file_system.php and lib/filestorage/file_system_filedir.php are still using legacy cron. Some of the cleanup tasks may be converted to a task, but not all. The missing ones must be moved over to the Scheduled Tasks system.
11.summary: Gradebook uses legacy cron
description: Looking gradelib.php I found another legacy cron function grade_cron(). That needs to be converted to scheduled task.
12.summary: Portfolio uses legacy cron
description: Doing a quick search I found another legacy cron function portfolio_cron() on portfolio.lib. That needs to be converted to scheduled task.
13.summary: Question uses legacy cron
description: Doing a quick search I found another legacy cron functions question_usage_statistics_cron() and question_preview_cron() on question. Those needs to be converted to scheduled task.
14.summary: Plagiarism uses legacy cron
description: Doing a quick search I found another legacy cron function plagiarism_cron() on plagiarismlib.lib. That needs to be converted to scheduled task.
15.summary: Reconcile with the deprecation policy
description: Working on some legacy cron functions have been removed without following moodle deprecation guidelines. This issue is about review each deprecation and add the functions back to deprecatedlib.php if necessary. Note that, because of the double-execution of cron problem... in this case we are not performing the deprecation phase1, but straight the phase2 (complete removal now). Still all the points in that phase remains valid. At the end we should ensure that: - All the removals have been documented. - There are not remaining xxxx_cron() functions in core. Ciao :-)
16.summary: Badges uses legacy cron
description: Badges have some legacy cron functions that needs to be converted to scheduled tasks.
17.summary: Completion uses legacy cron
description: Completion have some legacy code stuff that needs to be converted to scheduled tasks.

Below is an instruction that describes a task, paired with an input that provides an epic with this format: 
"project": "Name of the project" 
"summary": "Summary of the epic user story" 
"description": "Description of the epic user story". Write a response that appropriately completes the request.### Instruction:
Break this epic user story into smaller tasks to help the developers understand the epic better, you can divide this epic into as much as you want depending on the complexity of the epic.
### Input:
project: Moodle
summary: Remove any legacy cron from Moodle standard distribution
description: Remove any non legacy cron from Moodle standard distribution Since it is deprecated as of The orginal goal was to do this for the 3.5 release, but in the end, some of the subtasks below were not done until Moodle 3.7. Some (not all) areas that use it are - ++ Use of legacy cron is deprecated (repository_dropbox_cron). Please use scheduled tasks. ++ ++ Use of legacy cron is deprecated (repository_filesystem_cron). Please use scheduled tasks. ++ ++ Use of legacy cron is deprecated (\block_rss_client::cron()). Please use scheduled tasks. ++ ++ Use of legacy cron is deprecated (workshop_cron). Please use scheduled tasks. ++ ++ Use of legacy cron is deprecated (workshopallocation_scheduled_cron). Please use scheduled tasks. ++ ++ Use of legacy cron is deprecated (quiz_cron). Please use scheduled tasks. ++ ++ Use of legacy cron is deprecated (quiz_statistics_cron). Please use scheduled tasks. ++ ++ Use of legacy cron is deprecated (chat_cron). Please use scheduled tasks. ++ ++ Use of legacy cron is deprecated (assign_cron). Please use scheduled tasks. ++ ++ Use of legacy cron is deprecated (enrol_cohort). Please use scheduled tasks. ++ ++ Use of legacy cron is deprecated (enrol_self). Please use scheduled tasks. ++ Use of legacy cron is deprecated (enrol_manual). Please use scheduled tasks. ++

### Response:
1.summary: Quiz uses legacy cron
description: quiz module is still using legacy cron task to close open events. This probably should be moved over to the Scheduled Tasks system
2.summary: Standard enrolment plugins use legacy cron
description: As described in we need to convert legacy cron functions to scheduled tasks
3.summary: Standard block plugins use legacy cron
description: As described in we need to convert legacy cron functions to scheduled tasks The blocks rss_client and recent_activity are still using legacy cron.
4.summary: mod_assign uses legacy cron
description: mod_assign module is still using legacy cron. This must be moved over to the Scheduled Tasks system
5.summary: Wiki uses legacy cron
description: mod_wiki module is still using legacy cron. This must be moved over to the Scheduled Tasks system.
6.summary: Workshop uses legacy cron
description: Workshop module and some of their subcomponents, like allocations, are still using legacy cron. This must be moved over to the Scheduled Tasks system.
7.summary: Some repositories use legacy cron
description: Dropbox and filesystem repositories are still using legacy cron. This must be moved over to the Scheduled Tasks system.
8.summary: Chat uses legacy cron
description: Chat module is still using legacy cron. This must be moved over to the Scheduled Tasks system.
9.summary: Mnet auth uses legacy cron
description: auth_mnet plugin is still using legacy cron. This must be moved over to the Scheduled Tasks system.
10.summary: Filestorage uses legacy cron
description: lib/filestorage/file_storage.php, lib/filestorage/file_system.php and lib/filestorage/file_system_filedir.php are still using legacy cron. Some of the cleanup tasks may be converted to a task, but not all. The missing ones must be moved over to the Scheduled Tasks system.
11.summary: Gradebook uses legacy cron
description: Looking gradelib.php I found another legacy cron function grade_cron(). That needs to be converted to scheduled task.
12.summary: Portfolio uses legacy cron
description: Doing a quick search I found another legacy cron function portfolio_cron() on portfolio.lib. That needs to be converted to scheduled task.
13.summary: Question uses legacy cron
description: Doing a quick search I found another legacy cron functions question_usage_statistics_cron() and question_preview_cron() on question. Those needs to be converted to scheduled task.
14.summary: Plagiarism uses legacy cron
description: Doing a quick search I found another legacy cron function plagiarism_cron() on plagiarismlib.lib. That needs to be converted to scheduled task.
15.summary: Reconcile with the deprecation policy
description: Working on some legacy cron functions have been removed without following moodle deprecation guidelines. This issue is about review each deprecation and add the functions back to deprecatedlib.php if necessary. Note that, because of the double-execution of cron problem... in this case we are not performing the deprecation phase1, but straight the phase2 (complete removal now). Still all the points in that phase remains valid. At the end we should ensure that: - All the removals have been documented. - There are not remaining xxxx_cron() functions in core. Ciao :-)
16.summary: Badges uses legacy cron
description: Badges have some legacy cron functions that needs to be converted to scheduled tasks.
17.summary: Completion uses legacy cron
description: Completion have some legacy code stuff that needs to be converted to scheduled tasks.
