MDL-59630 analytics: Unit tests fixes
authorDavid Monllao <davidm@moodle.com>
Thu, 5 Oct 2017 15:38:17 +0000 (17:38 +0200)
committerDavid Monllao <davidm@moodle.com>
Thu, 5 Oct 2017 15:38:17 +0000 (17:38 +0200)
analytics/classes/manager.php
lib/db/tasks.php

index 3ab5dd9..3f116f3 100644 (file)
@@ -509,7 +509,7 @@ class manager {
         $contexts = $apcontexts + $indcalccontexts;
         if ($contexts) {
             list($sql, $params) = $DB->get_in_or_equal(array_keys($contexts));
-            $DB->execute("DELETE FROM {analytics_prediction_actions} apa WHERE apa.predictionid IN
+            $DB->execute("DELETE FROM {analytics_prediction_actions} WHERE predictionid IN
                 (SELECT ap.id FROM {analytics_predictions} ap WHERE ap.contextid $sql)", $params);
 
             $DB->delete_records_select('analytics_predictions', "contextid $sql", $params);
index b550c54..6873e42 100644 (file)
@@ -359,7 +359,7 @@ $tasks = array(
     array(
         'classname' => 'core\task\analytics_cleanup_task',
         'blocking' => 0,
-        'minute' => 'R',
+        'minute' => '42',
         'hour' => '*',
         'day' => '*',
         'dayofweek' => '*',