From d552efcee024d1a9d17a88f72aca9e006256b89a Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 3 Apr 2004 07:08:16 +0000 Subject: [PATCH] Links to enrolled courses in user profile page now link to the user profile page in that course. Makes it easy to see their discussions etc --- user/view.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/user/view.php b/user/view.php index 2bf5002f1c..73e2f30f5f 100644 --- a/user/view.php +++ b/user/view.php @@ -168,8 +168,8 @@ if ($mycourses = get_my_courses($user->id)) { $courselisting = ''; foreach ($mycourses as $mycourse) { - if ($mycourse->visible) { - $courselisting .= "wwwroot/course/view.php?id=$mycourse->id\">$mycourse->fullname, "; + if ($mycourse->visible and $mycourse->category) { + $courselisting .= "wwwroot/user/view.php?id=$user->id&course=$mycourse->id\">$mycourse->fullname, "; } } print_row(get_string('courses').':', rtrim($courselisting,', ')); @@ -231,7 +231,13 @@ } echo "\n"; - forum_print_user_discussions($course->id, $user->id); + $isseparategroups = ($course->groupmode == SEPARATEGROUPS and + $course->groupmodeforce and + !isteacheredit($course->id)); + + $groupid = $isseparategroups ? get_current_group($course->id) : NULL; + + forum_print_user_discussions($course->id, $user->id, $groupid); print_footer($course); -- 2.39.5