فهرست منبع

Dangerous: update c_lp_item_view.id field to iid in lp view id queries

Yannick Warnier 7 سال پیش
والد
کامیت
de9a52c58d
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      main/lp/learnpathItem.class.php

+ 3 - 3
main/lp/learnpathItem.class.php

@@ -1569,7 +1569,7 @@ class learnpathItem
                 $sql = "SELECT status FROM $table
                         WHERE
                             c_id = $course_id AND
-                            id = '".$this->db_item_view_id."' AND
+                            iid = '".$this->db_item_view_id."' AND
                             view_count = '" . $this->get_attempt_id()."'";
 
                 if ($debug > 2) {
@@ -1699,7 +1699,7 @@ class learnpathItem
                         FROM $table
                         WHERE
                             c_id = $course_id AND
-                            id = '".$this->db_item_view_id."' AND
+                            iid = '".$this->db_item_view_id."' AND
                             view_count = '" . $this->get_attempt_id()."'";
                 $res = Database::query($sql);
                 $row = Database::fetch_array($res);
@@ -3025,7 +3025,7 @@ class learnpathItem
         $res = Database::query($sql);
         if (Database::num_rows($res) > 0) {
             $row = Database::fetch_array($res);
-            $this->db_item_view_id = $row['id'];
+            $this->db_item_view_id = $row['iid'];
             $this->attempt_id = $row['view_count'];
             $this->current_score = $row['score'];
             $this->current_data = $row['suspend_data'];