[Moodle 3.5.1] Completely hide unenrolled courses

[Moodle 3.5.1] Completely hide unenrolled courses

by Anze Pratnemer -
Number of replies: 1

Greetings.


We are using manual enrolments via script from 3rd party information system. Categories and courses are created, users are correctly enrolled.


But there is still a link in Site Home page, that says All courses which lists all the courses that are in the system, although user cannot enrol into them.

I could hide that link via CSS, but URL that points to this list of all courses is easy: www.mysite.com/course/, not to mention that I dont know where else this kind of link exists site wide.


Also, if user is not enrolled into any course (which shouldn't happen anyway in our implementation), Site Home always lists all courses.


I'm using Moove theme if that is of any help and have all the enrolments apart from Manual Enrolment disabled.


  problematic link

Attachment All courses.png
Average of ratings: -
In reply to Anze Pratnemer

Re: [Moodle 3.5.1] Completely hide unenrolled courses

by Himanshu Sharma -

Hi Anze,


You can hide the course category list from the Moodle course index.php file.

You can simply create course renderer file in your current theme and there you can override the function course_category() which is in moodle/course/index.php


You can also take reference from 

https://moodle.org/mod/forum/discuss.php?d=170492

Hope this will help..

Regards

Himanshu Sharma