[patch] Don't list courses that are not enrollable

[patch] Don't list courses that are not enrollable

by Jay Knight -
Number of replies: 7

I have created a patch that provides the option of not listing courses that users can't do anything with (can't view as guest or self-enrol).  I was just wondering how likely it would be for this to be incorporated into moodle at some point (even if not in time for 2.0).

http://tracker.moodle.org/browse/MDL-23548

We have several courses that are only "manual enrolment".  That is, the teacher manually adds students.  We don't want these showing up in our course list since all someone see is "You cannot enrol yourself in this course" when trying to view it... we'd rather them not see it in the first place.  If the option is checked, the course will only appear if it is self-enrollable, has guest access, or the student is already enrolled.

Does this sound like something that could be accepted?

Edit: http://tracker.moodle.org/browse/MDL-17770 is a similar issue with a different suggested implementation, that would work as well.

Average of ratings: -
In reply to Jay Knight

Re: [patch] Don't list courses that are not enrollable

by Jay Knight -

Just wanted to bump this to see if anyone would like to respond... even if it's "That's a terrible idea, why would we want to do that?!"

Is there any way something like this would make it into moodle?

In reply to Jay Knight

Re: [patch] Don't list courses that are not enrollable

by Nigel Cunningham -

I, for one, would like something more flexible - I'd like to be able to show the non-enrollable courses in the list, but have them simply as text (no link). I'd also like to be able to highlight the courses the user is already enrolled in.

Perhaps a more generic solution can be found that lets us theme links (including hiding them) according to the user's status with regard to each course.

Average of ratings: Useful (2)
In reply to Jay Knight

Re: [patch] Don't list courses that are not enrollable

by Jay Knight -

I've updated my patch for this and pushed it to github.  We're about to get to the point where we really need to hide "unenrollable" courses from users.  What should my next step be?

I like Nigel's suggestions, but I probably won't be able to make that kind of change anytime soon.

In reply to Jay Knight

Re: [patch] Don't list courses that are not enrollable

by Jay Knight -

What's a guy got to do to get some feedback on things? smile  Is this just such as bad idea that it gets dismissed without comment?

In reply to Jay Knight

Re: [patch] Don't list courses that are not enrollable

by Rosario Carcò -

I think you get no answer because it is hard to implement every single "wish". Moodle was developed to allow for a lot of SELF-MADE-Extensions, so that everyone can "compose" his own Moodle on a MODULAR basis.

I developed a siteNavigation and myCourses Block to fit some of my Universities' needs. So what you are doing is in my opinion a mere navigation issue and could therefore be implemented in my siteNavigation or myCourses Block.

Please search for these two threads here in the forums and check whether I didn't already implement what you are requesting, e.g. not showing hidden courses to the users.

If I didn't, we could do it, if it is not demanding too much time for me.

Of course the whole COURSE-LIST of Moodle would then still present every course. Because it is my siteNavigation Block that filters out what should not be displayed depending on the Admin-Options-Settings you choose.

If you wanted also the COURSE-LIST to behave like you want, you are still free to use your patch without it being incorporated into core. Of course every wish/feature would be nice to be incorporated but it is not feasible I fear, there would be thousands...

Rosario

In reply to Rosario Carcò

Re: [patch] Don't list courses that are not enrollable

by Jay Knight -

Thanks for your response Rosaria.  I know the core development team can't do everything everyone wants, but I was at least hoping someone would respond with some reason why this would be a bad idea to put in the moodle core smile

I've already patched it for our site (patch in the tracker issue), but was hoping to get it included into core so that upgrading would be easier.  It's a pretty simple patch that works okay for us (may need more work for general use, so feedback would be nice) and is activated by a setting so that by default nothing would change for existing installations.

In reply to Jay Knight

Re: [patch] Don't list courses that are not enrollable

by Rosario Carcò -

I just reviewed our discussion here and forgot to mention that NOT DISPLAYING is not a good behaviour for security reasons. If your users happen to click on the "show all courses" link or simply happen to digit the url: http://yourmoodle.net/course either in Moodle 1.9 either in Moodle 2.x then they get a list of all courses anyway, EVEN IF THEY ARE NOT LOGGED IN...

So in my sitenavigation and mycourses blocks I actually DO check whether the users meet the desired conditions, i.e. is logged in or not, has the desired roles, e.g. Teacher or Student, and so on.

So I hope you do  not just filter out but instead check for the conditions you want your users to meet to see or not to see a given course.

Rosario