How to make users can only see their own courses?

How to make users can only see their own courses?

by xiao jie -
Number of replies: 9
Currently I want to make each student only can see his own courses, but not courses for others... Is that possible? How to do so?
Average of ratings: -
In reply to xiao jie

Re: How to make users can only see their own courses?

by Ralf Hilgenstock -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Translators
After login students see 'my courses' in the block. You can disable the link 'All courses' in website adminsitration and you can use the 'My Moodle page as an alternative startpage after login with more information about the own courses.


Ralf
In reply to Ralf Hilgenstock

Re: How to make users can only see their own courses?

by Ellen Marie Murphy -
Is there a way that faculty and students can turn off courses they no longer want to appear in the "my courses" block? They are complaining that there are too many courses in there. Thanks, Ellen
In reply to Ralf Hilgenstock

Re: How to make users can only see their own courses?

by Ian S -
My issue is that the "my courses" block switches to a "course categories" block listing all the courses on the site when a user who is not enrolled in any courses logs in.

So,
  1. Authenticated users enrolled in at least one course login to myMoodle and see only their courses in the "my courses" block. This is great.
  2. Authenticated users not enrolled in any courses login to myMoodle and see the entire course listing. Not ideal.
I'd like #1 without #2, but can't see any way of doing it without removing the entire block for everybody.

Cheers,
Ian



In reply to Ian S

Re: How to make users can only see their own courses?

by Kathryn Smith -
I changed blocks/course_list/block_course_list.php in order to do this. I edited line 64 as follows:

//if ($categories) { //Check we have categories. Commented out.
if (isadmin()) { //Only show categories if admin. Added.

This displays all courses for admin users but hides them if a user is not enrolled on any course.

I'd prefer to do this as a local customisation so that it won't be changed by future upgrades, but can't see how to do this. Any suggestions would be welcome.
Average of ratings: Useful (1)
In reply to Kathryn Smith

Re: How to make users can only see their own courses?

by Ian S -
Thanks Kathryn. That is exactly the change I was looking for.

I haven't heard of local customizations before, but it looks great. We have small changes scattered throughout Moodle and consolidating some or all to a /local folder would be great. Is this working as part of the current Moodle release?
In reply to Kathryn Smith

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: How to make users can only see their own courses?

by jay huff -
I have a client that wants the course list to be in chronological order from most recent to oldest. Is this possible to achieve??
In reply to Ian S

Re: How to make users can only see their own courses?

by Raymond Fürst -
There is another block "my courses" availiable here:
http://moodle.org/mod/data/view.php?d=13&rid=2178

This block shows all courses the user is enrolled ins, but sorted in a collapsable course category tree. To both users not enrolled and admins this block is not shown.

This block might be an alternative.
In reply to Raymond Fürst

Re: How to make users can only see their own courses?

by Brandon Blackmoor -

That block does not work with Moodle 2.2, unfortunately.