Skip to content

Commit 5becf16

Browse files
committed
Merge branch '1.9.x' of ssh://github.com/chamilo/chamilo-lms into chamilo19
2 parents 8cc2337 + f7e674f commit 5becf16

File tree

5 files changed

+51
-6
lines changed

5 files changed

+51
-6
lines changed

main/exercice/exercise_submit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@
684684
changestart: function(event, ui) {
685685
//var clicked = $(this).find('.ui-state-active').attr('id');
686686
//$('#'+clicked).load('/widgets/'+clicked);
687-
$('#collapse1').html('".addslashes($objExercise->description)."');
687+
$('#collapse1').html(".json_encode($objExercise->description).");
688688
}
689689
});
690690
});

main/inc/lib/course.lib.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4359,6 +4359,30 @@ public static function count_courses($access_url_id = null) {
43594359
$row = Database::fetch_row($res);
43604360
return $row[0];
43614361
}
4362+
4363+
/**
4364+
* Get availab le courses count
4365+
* @param int Access URL ID (optional)
4366+
* @return int Number of courses
4367+
*/
4368+
public static function countAvailableCourses($accessUrlId = null)
4369+
{
4370+
$tableCourse = Database::get_main_table(TABLE_MAIN_COURSE);
4371+
$tableCourseRelAccessUrl = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
4372+
$specialCourseList = self::get_special_course_list();
4373+
4374+
$withoutSpecialCourses = '';
4375+
if (!empty($specialCourseList)) {
4376+
$withoutSpecialCourses = ' AND c.code NOT IN ("'.implode('","',$specialCourseList).'")';
4377+
}
4378+
4379+
if (!empty($accessUrlId) && $accessUrlId == intval($accessUrlId)) {
4380+
$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";
4381+
}
4382+
$res = Database::query($sql);
4383+
$row = Database::fetch_row($res);
4384+
return $row[0];
4385+
}
43624386

43634387
/**
43644388
* Return a link to go to the course, validating the visibility of the

main/inc/lib/course_category.lib.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,8 @@ function browseCourseCategories()
441441
if (api_is_multiple_url_enabled()) {
442442
$url_access_id = api_get_current_access_url_id();
443443
}
444-
$countCourses = CourseManager :: count_courses($url_access_id);
444+
$countCourses = CourseManager :: countAvailableCourses($url_access_id);
445+
445446
$categories = array();
446447
$categories[0][0] = array(
447448
'id' => 0,
@@ -509,7 +510,7 @@ function countCoursesInCategory($category_code="")
509510
}
510511

511512
$sql = "SELECT * FROM $tbl_course
512-
WHERE category_code" . "='" . $category_code . "'" . $without_special_courses;
513+
WHERE visibility != '0' AND visibility != '4' AND category_code" . "='" . $category_code . "'" . $without_special_courses;
513514
// Showing only the courses of the current portal access_url_id.
514515

515516
if (api_is_multiple_url_enabled()) {
@@ -519,7 +520,7 @@ function countCoursesInCategory($category_code="")
519520
$sql = "SELECT * FROM $tbl_course as course
520521
INNER JOIN $tbl_url_rel_course as url_rel_course
521522
ON (url_rel_course.course_code=course.code)
522-
WHERE access_url_id = $url_access_id AND category_code" . "='" . $category_code . "'" . $without_special_courses;
523+
WHERE access_url_id = $url_access_id AND course.visibility != '0' AND course.visibility != '4' AND category_code" . "='" . $category_code . "'" . $without_special_courses;
523524
}
524525
}
525526
return Database::num_rows(Database::query($sql));
@@ -654,7 +655,7 @@ function browseCoursesInCategory($category_code, $random_value = null)
654655
'count_connections' => $count_connections_last_month
655656
);
656657
}
657-
return $courses;
658+
return $courses;
658659
}
659660

660661
/**
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* For FCKeditor 2.3
3+
*
4+
*
5+
*/
6+
7+
FCKLang['MediaTip'] = 'Media invoegen/uitgeven' ;
8+
FCKLang['DlgMediaTitle'] = 'Media eigenschap' ;
9+
FCKLang['DlgMediaCode'] = '"Please insert the URL of Media videos."' ;
10+
FCKLang['DlgMediaSecurity'] = 'Ongeldige URL.' ;
11+
FCKLang['DlgMediaURL'] = 'URL' ;
12+
FCKLang['DlgMediaWidth'] = 'Breedte' ;
13+
FCKLang['DlgMediaHeight'] = 'Hoogte' ;
14+
FCKLang['DlgMediaQuality'] = 'Qualiteit' ;
15+
FCKLang['DlgMediaLow'] = 'Laag' ;
16+
FCKLang['DlgMediaHigh'] = 'Hoog (indien beschikbaar)' ;
17+
FCKLang['DlgMediaURLTip'] = 'Tip:' ;
18+
FCKLang['DlgMediaURLTipContent1'] = 'Go to %s. Navigate within the site to find your video.' ;
19+
FCKLang['DlgMediaURLTipContent2'] = 'Copy the URL of the video from your browser\'s address box and paste it in this dialog, the "URL" box.' ;
20+
FCKLang['DlgMediaURLTipContent3'] = 'The copied URL should look like %s.' ;

main/inc/lib/main_api.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// PHP version requirement.
1616
define('REQUIRED_PHP_VERSION', '5.3');
1717

18-
define('REQUIRED_MIN_MEMORY_LIMIT', '32');
18+
define('REQUIRED_MIN_MEMORY_LIMIT', '128');
1919
define('REQUIRED_MIN_UPLOAD_MAX_FILESIZE', '10');
2020
define('REQUIRED_MIN_POST_MAX_SIZE', '10');
2121

0 commit comments

Comments
 (0)