Merge branch 'MDL-33788b-23' of git://github.com/srynot4sale/moodle into MOODLE_23_STABLE
authorSam Hemelryk <sam@moodle.com>
Sun, 15 Jul 2012 21:18:46 +0000 (09:18 +1200)
committerSam Hemelryk <sam@moodle.com>
Sun, 15 Jul 2012 21:18:46 +0000 (09:18 +1200)
lib/completion/cron.php

index 3645c06..bf2a646 100644 (file)
@@ -377,10 +377,11 @@ function completion_cron_completions() {
         SET
             reaggregate = 0
         WHERE
-            reaggregate < {$timestarted}
+            reaggregate < :timestarted
+        AND reaggregate > 0
     ";
 
-    $DB->execute($sql);
+    $DB->execute($sql, array('timestarted' => $timestarted));
 }
 
 /**