mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-65051 core: delete plagiarism_cron() function
This commit is contained in:
parent
3528bce1a6
commit
39802ea08a
2 changed files with 4 additions and 21 deletions
|
@ -160,27 +160,7 @@ function plagiarism_print_disclosure($cmid) {
|
|||
}
|
||||
return $output;
|
||||
}
|
||||
/**
|
||||
* used by admin/cron.php to get similarity scores from submitted files.
|
||||
*
|
||||
*/
|
||||
function plagiarism_cron() {
|
||||
global $CFG;
|
||||
if (empty($CFG->enableplagiarism)) {
|
||||
return '';
|
||||
}
|
||||
$plagiarismplugins = plagiarism_load_available_plugins();
|
||||
foreach($plagiarismplugins as $plugin => $dir) {
|
||||
require_once($dir.'/lib.php');
|
||||
$plagiarismclass = "plagiarism_plugin_$plugin";
|
||||
$plagiarismplugin = new $plagiarismclass;
|
||||
if (method_exists($plagiarismplugin, 'cron')) {
|
||||
mtrace('Processing cron function for plagiarism_plugin_' . $plugin . '...', '');
|
||||
cron_trace_time_and_memory();
|
||||
$plagiarismplugin->cron();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* helper function - also loads lib file of plagiarism plugin
|
||||
* @return array of available plugins
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
This files describes API changes for code that uses the plagiarism API.
|
||||
=== 3.7 ===
|
||||
|
||||
* The plagiarism_cron() function has been deleted, plugins should implement their own scheduled tasks.
|
||||
|
||||
=== 3.4 ===
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue