Merge branch '5048' into 1.11.x

pull/5867/head
Yannick Warnier 11 months ago
commit a151a2bf01
  1. 3
      main/inc/ajax/course_category.ajax.php
  2. 2
      main/inc/lib/course_category.lib.php

@ -31,7 +31,8 @@ switch ($action) {
$result = '';
foreach ($courses as $course) {
$row++;
$table->setCellContents($row, 0, $course['title']);
$courseLink = '<a href="'.api_get_path(WEB_PATH).'courses/'.$course['directory'].'/index.php">'.$course['title'].'</a>';
$table->setCellContents($row, 0, $courseLink);
}
echo $table->toHtml();

@ -728,7 +728,7 @@ class CourseCategory
$urlCondition = ' access_url_id = '.api_get_current_access_url_id().' AND';
$tbl_url_rel_course = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
$select = " DISTINCT course.id, course.code, course.title, course.category_code ";
$select = " DISTINCT course.id, course.code, course.title, course.category_code, course.directory ";
if ($getCount) {
$select = "count(DISTINCT course.id) as count";
}

Loading…
Cancel
Save