From 8cf1862ccc8c57c80646629650859e5d0003705f Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Mon, 26 Sep 2011 13:15:15 +1300 Subject: [PATCH] MDL-29519 move plagiarism cron to after event queue --- lib/cronlib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/cronlib.php b/lib/cronlib.php index dc944a4228d..38ec6ae797d 100644 --- a/lib/cronlib.php +++ b/lib/cronlib.php @@ -126,10 +126,6 @@ function cron_run() { } mtrace('Finished blocks'); - //now do plagiarism checks - require_once($CFG->libdir.'/plagiarismlib.php'); - plagiarism_cron(); - mtrace("Starting quiz reports"); if ($reports = $DB->get_records_select('quiz_reports', "cron > 0 AND ((? - lastcron) > cron)", array($timenow))) { foreach ($reports as $report) { @@ -187,6 +183,10 @@ function cron_run() { mtrace('done'); } + //now do plagiarism checks + require_once($CFG->libdir.'/plagiarismlib.php'); + plagiarism_cron(); + /// Run all core cron jobs, but not every time since they aren't too important. /// These don't have a timer to reduce load, so we'll use a random number /// to randomly choose the percentage of times we should run these jobs.