Browse Source

Fix creation forums threads for LP items - refs BT#10629

Angel Fernando Quiroz Campos 9 years ago
parent
commit
c4f585fc5d
1 changed files with 5 additions and 1 deletions
  1. 5 1
      main/newscorm/learnpathItem.class.php

+ 5 - 1
main/newscorm/learnpathItem.class.php

@@ -4437,7 +4437,11 @@ class learnpathItem
                     'ip.visibility != ? AND ' => 2,
                     'ip.tool = ? AND ' => TOOL_FORUM_THREAD,
                     'ft.c_id = ? AND ' => intval($lpCourseId),
-                    'ft.lp_item_id = ?' => intval($this->db_id)
+                    '(ft.lp_item_id = ? OR (ft.thread_title = ? AND ft.lp_item_id = ?))' => [
+                        intval($this->db_id),
+                        "{$this->title} - {$this->db_id}",
+                        intval($this->db_id)
+                    ]
                 ]
             ],
             'first'