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

1.10.x
Yannick Warnier 9 years ago
commit 31721d7938
  1. 7
      main/admin/access_url_edit_courses_to_url.php
  2. 5
      main/admin/course_list.php
  3. 4
      main/inc/lib/urlmanager.lib.php

@ -129,7 +129,7 @@ if($ajax_search) {
}
$tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE);
$sql="SELECT code, title
$sql="SELECT id, code, title
FROM $tbl_course u
ORDER BY title, code";
$result = Database::query($sql);
@ -210,7 +210,7 @@ $url_list = UrlManager::get_url_data();
<?php
foreach($no_course_list as $no_course) {
?>
<option value="<?php echo $no_course['code']; ?>"><?php echo $no_course['title'].' ('.$no_course['code'].')'; ?></option>
<option value="<?php echo $no_course['id']; ?>"><?php echo $no_course['title'].' ('.$no_course['code'].')'; ?></option>
<?php
}
unset($no_course_list);
@ -247,8 +247,9 @@ $url_list = UrlManager::get_url_data();
<select id="destination_users" name="course_list[]" multiple="multiple" size="15" style="width:380px;">
<?php
foreach($course_list as $course) {
$courseInfo = api_get_course_info_by_id($course['id']);
?>
<option value="<?php echo $course['course_code']; ?>"><?php echo $course['title'].' ('.$course['course_code'].')'; ?></option>
<option value="<?php echo $course['id']; ?>"><?php echo $course['title'].' ('.$courseInfo['code'].')'; ?></option>
<?php
}
unset($course_list);

@ -95,13 +95,14 @@ function get_course_data($from, $number_of_items, $column, $direction)
visibility AS col8,
directory as col9,
visual_code
FROM $course_table";
FROM $course_table course";
if ((api_is_platform_admin() || api_is_session_admin()) &&
api_is_multiple_url_enabled() && api_get_current_access_url_id() != -1
) {
$access_url_rel_course_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
$sql.= " INNER JOIN $access_url_rel_course_table url_rel_course ON (id = url_rel_course.c_id)";
$sql.= " INNER JOIN $access_url_rel_course_table url_rel_course
ON (course.id = url_rel_course.c_id)";
}
if (isset ($_GET['keyword'])) {

@ -896,12 +896,10 @@ class UrlManager
}
// Adding courses
foreach ($course_list as $course_code) {
if (!in_array($course_code, $courseId)) {
foreach ($course_list as $courseId) {
UrlManager::add_course_to_url($courseId, $access_url_id);
CourseManager::update_course_ranking($courseId, 0, $access_url_id);
}
}
// Deleting old courses
foreach ($existing_courses as $courseId) {

Loading…
Cancel
Save