From f1667d16edb17da21eb9a3ec097681feefc5788b Mon Sep 17 00:00:00 2001 From: Juan Cortizas Ponte <124381395+juancpbinario@users.noreply.github.com> Date: Wed, 10 Jan 2024 20:54:08 +0100 Subject: [PATCH 1/2] Course categories: Add link on course name --- main/inc/ajax/course_category.ajax.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/inc/ajax/course_category.ajax.php b/main/inc/ajax/course_category.ajax.php index fb5c0d218a1..117f2270779 100644 --- a/main/inc/ajax/course_category.ajax.php +++ b/main/inc/ajax/course_category.ajax.php @@ -31,7 +31,8 @@ $result = ''; foreach ($courses as $course) { $row++; - $table->setCellContents($row, 0, $course['title']); + $courseLink = ''.$course['title'].''; + $table->setCellContents($row, 0, $courseLink); } echo $table->toHtml(); From 2c58196a88565b01a0fe7953790e758fb4b364d7 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Sun, 13 Oct 2024 01:19:57 +0200 Subject: [PATCH 2/2] Minor: Course category: Add link on course title - refs #5048 --- main/inc/ajax/course_category.ajax.php | 2 +- main/inc/lib/course_category.lib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main/inc/ajax/course_category.ajax.php b/main/inc/ajax/course_category.ajax.php index 117f2270779..d636dff77b1 100644 --- a/main/inc/ajax/course_category.ajax.php +++ b/main/inc/ajax/course_category.ajax.php @@ -31,7 +31,7 @@ $result = ''; foreach ($courses as $course) { $row++; - $courseLink = ''.$course['title'].''; + $courseLink = ''.$course['title'].''; $table->setCellContents($row, 0, $courseLink); } diff --git a/main/inc/lib/course_category.lib.php b/main/inc/lib/course_category.lib.php index a7bddba3add..bdb2254d6bd 100755 --- a/main/inc/lib/course_category.lib.php +++ b/main/inc/lib/course_category.lib.php @@ -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"; }