Kaynağa Gözat

Fix show wrong links while creating a LP see BT#11817

jmontoyaa 8 yıl önce
ebeveyn
işleme
ca2728b3a8
1 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 3 3
      main/lp/learnpath.class.php

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

@@ -8949,7 +8949,7 @@ class learnpath
                     link_category.category_title as category_title
                 FROM $tbl_link as link
                 LEFT JOIN $linkCategoryTable as link_category
-                ON link.category_id = link_category.id
+                ON (link.category_id = link_category.id AND link.c_id = link_category.c_id)
                 WHERE link.c_id = ".$course_id." $condition_session
                 ORDER BY link_category.category_title ASC, link.title ASC";
         $links = Database::query($sql);
@@ -11155,8 +11155,8 @@ EOD;
         $lpItemId = [];
 
         $typeListNotToVerify = self::getChapterTypes();
-	    
-	// Using get_toc() function instead $this->items because returns the correct order of the items  
+
+	// Using get_toc() function instead $this->items because returns the correct order of the items
         foreach ($this->get_toc() as $item) {
             if (!in_array($item['type'], $typeListNotToVerify)) {
                 $lpItemId[] = $item['id'];