Hide courses when logged in but not enrolled in a course

Re: Hide courses when logged in but not enrolled in a course

by Callan Rose -
Number of replies: 2

Hi Brian

I considered the "creating a course and adding all users to it" as a solution, but really didn't want users to have to put up with having an extra course on their list.

Thankfully I work with a very talented multimedia developer and she managed to come up with a solution. It isn't particularly pretty, or even best practice, but it does produce the desired results for the user. My limited understanding is this; when a user that is enrolled in a course logs in, the course list refers to a div class called "unlist" which displays only the courses they are enrolled in. If a user that is not enrolled in any courses logs in the the course list refers to a div class called "box categorybox", which displays all the courses. She manipulated the theme so that when the "box categorybox" div class is called up it presents a "No course information to show" message instead.

Like I said, by her own admission it isn't the best thing to do but from my perspective it achieves what it needs to.  

Average of ratings: Useful (1)
In reply to Callan Rose

Re: Hide courses when logged in but not enrolled in a course

by Brian Peat -

Nice! I actually use the additional html box to load an inline style sheet filled with mods to the theme. All kinds of tricks to hide navigation items (like the participants item with seems useless and confusing since it only lists you, or you and the person who's profile page you're currently on). It's a bit of a "hack" but it loads pretty quickly and it didn't force me to modify the theme, which was nice.

In reply to Callan Rose

Re: Hide courses when logged in but not enrolled in a course

by Patricia Giraldo -

Hello Callan

Nice! What is the program that lists the courses the users are enrolled in?