Skip to content

Commit 2c58196

Browse files
committed
Minor: Course category: Add link on course title - refs #5048
1 parent 05ced4d commit 2c58196

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

main/inc/ajax/course_category.ajax.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
$result = '';
3232
foreach ($courses as $course) {
3333
$row++;
34-
$courseLink = '<a href="'.api_get_path(WEB_PATH).'courses/'.$course['code'].'/index.php">'.$course['title'].'</a>';
34+
$courseLink = '<a href="'.api_get_path(WEB_PATH).'courses/'.$course['directory'].'/index.php">'.$course['title'].'</a>';
3535
$table->setCellContents($row, 0, $courseLink);
3636
}
3737

main/inc/lib/course_category.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ public static function getCoursesInCategory(
728728

729729
$urlCondition = ' access_url_id = '.api_get_current_access_url_id().' AND';
730730
$tbl_url_rel_course = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
731-
$select = " DISTINCT course.id, course.code, course.title, course.category_code ";
731+
$select = " DISTINCT course.id, course.code, course.title, course.category_code, course.directory ";
732732
if ($getCount) {
733733
$select = "count(DISTINCT course.id) as count";
734734
}

0 commit comments

Comments
 (0)