瀏覽代碼

Merge branch '1.9.x' of ssh://github.com/chamilo/chamilo-lms into chamilo19

Julio Montoya 10 年之前
父節點
當前提交
5becf16d4e

+ 1 - 1
main/exercice/exercise_submit.php

@@ -684,7 +684,7 @@ if (!empty($objExercise->description)) {
                 changestart: function(event, ui) {
                     //var clicked = $(this).find('.ui-state-active').attr('id');
                     //$('#'+clicked).load('/widgets/'+clicked);
-                    $('#collapse1').html('".addslashes($objExercise->description)."');
+                    $('#collapse1').html(".json_encode($objExercise->description).");
                 }
             });
          });

+ 24 - 0
main/inc/lib/course.lib.php

@@ -4359,6 +4359,30 @@ class CourseManager
         $row = Database::fetch_row($res);
         return $row[0];
     }
+    
+    /**
+     * Get availab le courses count
+     * @param int Access URL ID (optional)
+     * @return int Number of courses
+     */
+    public static function countAvailableCourses($accessUrlId = null)
+    {
+        $tableCourse = Database::get_main_table(TABLE_MAIN_COURSE);
+        $tableCourseRelAccessUrl = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
+        $specialCourseList = self::get_special_course_list();
+
+        $withoutSpecialCourses = '';
+        if (!empty($specialCourseList)) {
+            $withoutSpecialCourses = ' AND c.code NOT IN ("'.implode('","',$specialCourseList).'")';
+        }
+        
+        if (!empty($accessUrlId) && $accessUrlId == intval($accessUrlId)) {
+            $sql = "SELECT count(id) FROM $tableCourse c, $tableCourseRelAccessUrl u WHERE c.code = u.course_code AND u.access_url_id = $accessUrlId AND c.visibility != 0 AND c.visibility != 4 $withoutSpecialCourses";
+        }
+        $res = Database::query($sql);
+        $row = Database::fetch_row($res);
+        return $row[0];
+    }
 
     /**
      * Return a link to go to the course, validating the visibility of the

+ 5 - 4
main/inc/lib/course_category.lib.php

@@ -441,7 +441,8 @@ function browseCourseCategories()
     if (api_is_multiple_url_enabled()) {
         $url_access_id = api_get_current_access_url_id();
     }
-    $countCourses = CourseManager :: count_courses($url_access_id);
+    $countCourses = CourseManager :: countAvailableCourses($url_access_id);
+    
     $categories = array();
     $categories[0][0] = array(
         'id' => 0,
@@ -509,7 +510,7 @@ function countCoursesInCategory($category_code="")
     }
 
     $sql = "SELECT * FROM $tbl_course
-            WHERE category_code" . "='" . $category_code . "'" . $without_special_courses;
+            WHERE visibility != '0' AND visibility != '4' AND category_code" . "='" . $category_code . "'" . $without_special_courses;
     // Showing only the courses of the current portal access_url_id.
 
     if (api_is_multiple_url_enabled()) {
@@ -519,7 +520,7 @@ function countCoursesInCategory($category_code="")
             $sql = "SELECT * FROM $tbl_course as course
                     INNER JOIN $tbl_url_rel_course as url_rel_course
                     ON (url_rel_course.course_code=course.code)
-                    WHERE access_url_id = $url_access_id AND category_code" . "='" . $category_code . "'" . $without_special_courses;
+                    WHERE access_url_id = $url_access_id AND course.visibility != '0' AND course.visibility != '4' AND category_code" . "='" . $category_code . "'" . $without_special_courses;
         }
     }
     return Database::num_rows(Database::query($sql));
@@ -654,7 +655,7 @@ function browseCoursesInCategory($category_code, $random_value = null)
             'count_connections' => $count_connections_last_month
         );
     }
-    return $courses;
+    return $courses;      
 }
 
 /**

+ 20 - 0
main/inc/lib/fckeditor/editor/plugins/media/lang/nl.js

@@ -0,0 +1,20 @@
+/*
+ * For FCKeditor 2.3
+ *
+ *
+ */
+
+FCKLang['MediaTip']			 = 'Media invoegen/uitgeven' ;
+FCKLang['DlgMediaTitle']		= 'Media eigenschap' ;
+FCKLang['DlgMediaCode']		= '"Please insert the URL of Media videos."' ;
+FCKLang['DlgMediaSecurity']	= 'Ongeldige URL.' ;
+FCKLang['DlgMediaURL']	    = 'URL' ;
+FCKLang['DlgMediaWidth']	    = 'Breedte' ;
+FCKLang['DlgMediaHeight']	    = 'Hoogte' ;
+FCKLang['DlgMediaQuality']    = 'Qualiteit' ;
+FCKLang['DlgMediaLow']	    = 'Laag' ;
+FCKLang['DlgMediaHigh']	    = 'Hoog (indien beschikbaar)' ;
+FCKLang['DlgMediaURLTip']		= 'Tip:' ;
+FCKLang['DlgMediaURLTipContent1']  = 'Go to %s. Navigate within the site to find your video.' ;
+FCKLang['DlgMediaURLTipContent2']  = 'Copy the URL of the video from your browser\'s address box and paste it in this dialog, the "URL" box.' ;
+FCKLang['DlgMediaURLTipContent3']  = 'The copied URL should look like %s.' ;

+ 1 - 1
main/inc/lib/main_api.lib.php

@@ -15,7 +15,7 @@
 // PHP version requirement.
 define('REQUIRED_PHP_VERSION', '5.3');
 
-define('REQUIRED_MIN_MEMORY_LIMIT',         '32');
+define('REQUIRED_MIN_MEMORY_LIMIT',         '128');
 define('REQUIRED_MIN_UPLOAD_MAX_FILESIZE',  '10');
 define('REQUIRED_MIN_POST_MAX_SIZE',        '10');