Skip to content

Commit

Permalink
MDL-65051 core: delete plagiarism_cron() function
Browse files Browse the repository at this point in the history
  • Loading branch information
lameze committed Mar 27, 2019
1 parent 3528bce commit 39802ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
22 changes: 1 addition & 21 deletions lib/plagiarismlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions plagiarism/upgrade.txt
Original file line number Diff line number Diff line change
@@ -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 ===

Expand Down

0 comments on commit 39802ea

Please sign in to comment.