Merge branch '1.11.x' of github.com:chamilo/chamilo-lms into 1.11.x

pull/2827/head
Yannick Warnier 7 years ago
commit 8b50d2fc41
  1. 4
      main/admin/legal_add.php
  2. 2
      main/auth/courses_controller.php
  3. 14
      main/inc/lib/CoursesAndSessionsCatalog.class.php
  4. 5
      main/inc/lib/extra_field.lib.php

@ -41,7 +41,7 @@ foreach ($types as $variable => $name) {
'changeable' => true,
'filter' => true,
'visible_to_self' => true,
'visible_to_others' => true
'visible_to_others' => true,
];
$extraField->save($params);
}
@ -162,10 +162,8 @@ if (isset($_POST['language'])) {
[],
false,
true
);
$jqueryReady = $returnParams['jquery_ready_content'];
$form->addElement('textarea', 'changes', get_lang('ExplainChanges'), ['width' => '20']);

@ -111,7 +111,6 @@ class CoursesController
//$browse_course_categories = CoursesAndSessionsCatalog::getCourseCategories();
$listCategories = CoursesAndSessionsCatalog::getCourseCategoriesTree();
$data['countCoursesInCategory'] = CourseCategory::countCoursesInCategory($category_code);
if ($action === 'display_random_courses') {
// Random value is used instead limit filter
@ -122,7 +121,6 @@ class CoursesController
$data['countCoursesInCategory'] = count($data['browse_courses_in_category']);
} else {
if (!isset($category_code)) {
$category_code = $listCategories['ALL']['code']; // by default first category
}

@ -174,7 +174,7 @@ class CoursesAndSessionsCatalog
'parent_id' => null,
'tree_pos' => 0,
'number_courses' => $countCourses,
'level' => 0
'level' => 0,
];
$allCategories = CourseCategory::getAllCategories();
@ -205,7 +205,7 @@ class CoursesAndSessionsCatalog
'auth_course_child' => true,
'auth_cat_child' => true,
'number_courses' => $count_courses,
'level' => 0
'level' => 0,
];
$result = array_merge($list, $categories);
@ -213,7 +213,6 @@ class CoursesAndSessionsCatalog
return $result;
}
/**
* @return array
*/
@ -382,7 +381,6 @@ class CoursesAndSessionsCatalog
$visibilityCondition
ORDER BY title $limitFilter ";
} else {
$sql = "SELECT *, id as real_id FROM $tbl_course course
WHERE
$conditionCode
@ -694,9 +692,11 @@ class CoursesAndSessionsCatalog
}
/**
* Build a recursive tree of course categories
* Build a recursive tree of course categories.
*
* @param $categories
* @param $parentId
*
* @return array
*/
public static function buildCourseCategoryTree($categories, $parentId = 0, $level = 0)
@ -731,8 +731,10 @@ class CoursesAndSessionsCatalog
}
/**
* List Code Search Category
* List Code Search Category.
*
* @param $code
*
* @return array
*/
public static function childrenCategories($code)

@ -51,7 +51,7 @@ class ExtraField extends Model
'extra_field_type',
//Enable this when field_loggeable is introduced as a table field (2.0)
//'field_loggeable',
'created_at'
'created_at',
];
public $ops = [
@ -1107,7 +1107,7 @@ class ExtraField extends Model
$translatedDisplayText = get_lang($field_details['display_text'], true);
$translatedDisplayHelpText = '';
if ($help) {
$translatedDisplayHelpText .= get_lang($field_details['display_text'] . 'Help');
$translatedDisplayHelpText .= get_lang($field_details['display_text'].'Help');
}
$label = [$translatedDisplayText, $translatedDisplayHelpText];
if (!empty($translatedDisplayText)) {
@ -1148,7 +1148,6 @@ class ExtraField extends Model
'Width' => '100%',
'Height' => '130',
'id' => 'extra_'.$field_details['variable'],
]
);
$form->applyFilter('extra_'.$field_details['variable'], 'stripslashes');

Loading…
Cancel
Save