Skip to content

Commit

Permalink
Merge branch '5048' into 1.11.x
Browse files Browse the repository at this point in the history
  • Loading branch information
ywarnier committed Oct 12, 2024
2 parents 8c27c9d + 2c58196 commit a151a2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion main/inc/ajax/course_category.ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
$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();
Expand Down
2 changes: 1 addition & 1 deletion main/inc/lib/course_category.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ public static function getCoursesInCategory(

$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";
}
Expand Down

0 comments on commit a151a2b

Please sign in to comment.