Want to restrict what courses a "guest" can see. HELP

Want to restrict what courses a "guest" can see. HELP

by Mark Ellis -
Number of replies: 5
I am having an issue with a project at work that I am having issues resolving. I was wondering if anyone had an idea:

Presently we have a moodle environment set up that is only for internal use, so only people that I assign to a course can login, or view a course (no guest access allowed). I am working on expanding our system so that salesman can post promo materials as a course and send the moodle link to a customer and have them login as a guest. My goal is to have the guests only see the "allow guests without a key" courses and hide all the "do not allow guests" courses from their view. Do you have an idea how to make this happen?

I've tried changing the guest role to prohibit "view courses" and even have tried editing the block_course_list.php file in the blocks folder, but neither worked.

Any ideas?
Mark.
Average of ratings: -
In reply to Mark Ellis

Re: Want to restrict what courses a "guest" can see. HELP

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
How about -making your logged in courses hidden and then giving your logged in (authenticated users) the permission to view hidden courses in site admin>define roles? (just a thought - I haven't tried it!)
In reply to Mary Cooch

Re: Want to restrict what courses a "guest" can see. HELP

by Mark Ellis -
I can see that working. My only issue with that is that I have a large amount of hidden courses already that can't be made public yet. I wish it wasn't so complex smile
In reply to Mary Cooch

Re: Want to restrict what courses a "guest" can see. HELP

by Mark Ellis -
I just tested that idea on a virtual machine, and it does work. This would be a great fix for anyone out that that does not need to have hidden courses.

So I guess my issue has got a little more complex.

Updated:
I have separated all my courses into two main course headings: Guest and Non-Guest. I would like guests to be able to log in and only see courses I have listed as "allow guests without a key" (which is all the courses under the "Guest" course heading). All of other courses are to be hidden to the guest (courses under the "Non-Guest" course heading). Within the "Non-Guest" section of courses, I will have some visible and some hidden at all times.

Any ideas?
In reply to Mary Cooch

Re: Want to restrict what courses a "guest" can see. HELP

by Mark Ellis -
Ok, might have found one solution:

Do like Mary said and make all courses hidden. Change the permission of "Student" to Allow for "See hidden courses". Make sure they are at "none" for "See hidden categories". Create a new Catagory for courses (site administration, courses, add/edit courses), and safe this as Temp or something like that. Make this category hidden, and move all the courses you want to remain hidden in there. You will have to still make the individual course hidden as well, even though it is located in the hidden category folder. Make sure you keep any course you want Guests to be able to see, visible. Now when a guest logs in, they see the Guest friendly courses (make sure these visible classes are set to allow guest access without a key...if you just wan them to not have to type a password). When a student logs in, they can see the Guest courses and all the other courses minus the ones within the hidden category "Temp".

This is one quick way. Any other ideas?
In reply to Mark Ellis

Re: Want to restrict what courses a "guest" can see. HELP

by Mark Ellis -
Is there a way that "Guests" can only see what is Visible, and that "Students" can ONLY see what is hidden?

In other words, I want Guest to see their classes only (class in the guest category) and students to only see student classes (classes in the Non-Guest category) and not courses from the Guest category as well.

the plot thickens.