Browse Source

Don't show basic_course_documents when is empty - refs BT#15362

Angel Fernando Quiroz Campos 6 years ago
parent
commit
a79b7564f7
1 changed files with 11 additions and 0 deletions
  1. 11 0
      main/inc/lib/document.lib.php

+ 11 - 0
main/inc/lib/document.lib.php

@@ -635,6 +635,17 @@ class DocumentManager
                     }
                 }
 
+                if (self::isBasicCourseFolder($row['path'], $sessionId)) {
+                    $basicCourseDocumentsContent = self::getAllDocumentData(
+                        $courseInfo,
+                        $row['path']
+                    );
+
+                    if (empty($basicCourseDocumentsContent)) {
+                        continue;
+                    }
+                }
+
                 $rows[$row['id']] = $row;
             }