MDL-57791 analytics: Delete should be an instance method
authorDavid Monllao <davidm@moodle.com>
Fri, 9 Jun 2017 15:59:31 +0000 (17:59 +0200)
committerDavid Monllao <davidm@moodle.com>
Mon, 24 Jul 2017 06:36:44 +0000 (08:36 +0200)
analytics/classes/model.php

index 56b1d57..2763197 100644 (file)
@@ -343,10 +343,10 @@ class model {
      *
      * @return void
      */
-    public static function delete() {
+    public function delete() {
         global $DB;
         $this->clear_model();
-        $DB->delete_record('analytics_models', array('id' => $this->model->id));
+        $DB->delete_records('analytics_models', array('id' => $this->model->id));
     }
 
     /**