Managing and displaying 'Course categories'

Managing and displaying 'Course categories'

by Indra Van Caesbroeck -
Number of replies: 4
I'm a first time Moodle user and am slowly familiarizing myself with the LMS. We're running Moodle 4.3.

However, I seem to be struggling with course categories.

  1. I would like to display the course categories to every logged in user, but only for the courses they are enrolled in.
  2. Additionally: When setting up the Site Home page, the 'List of categories' option only shows categories to "higher" roles, such as admins and content creators. As soon as someone has another role like 'Editing teacher' or 'Student', it doesn't show up anymore.
2 screenshots from the admin-view:

The site home setting I refer to and a screenshot from the Homepage showing the course categories




We have 2 very distinct course categories with courses that shouldn't be visible to anyone who isn't enrolled in them.

Is this possible at all? I'm starting to fear it isn't after scouring the internet/Moodle forums.


Average of ratings: -
In reply to Indra Van Caesbroeck

Re: Managing and displaying 'Course categories'

by Mary Cooch (personal account) -
Picture of Documentation writers Picture of Testers
Not quite what you want (I presume you want to display the categories of courses they are enrolled in *and* into which they can enrol?) 

If you just set the Site home items to Enrolled courses and not Course categories, then they can see which category their courses are in from the My courses page - under each course name as in the example screenshot below - categories such as Physical Education, Society and Environment, Art and Media. This should be done by default - if you don't see that then check Site administration > Plugins> Blocks > Course overview >Display course categories.
This of course only shows the categories of the courses where they are enrolled, and doesn't show other courses in those categories in which they are not enrolled.
Attachment coursecategories.png
In reply to Mary Cooch (personal account)

Re: Managing and displaying 'Course categories'

by Indra Van Caesbroeck -
Hi Mary,

Thanks for taking the time to reply.

No, that's not what I mean.

What I mean is: I want all users (regardless of their role) to be able to see the course categories block on the 'Site home' page. 

When you navigate to (xxx.com/admin/settings.php?section=frontpagesettings) Site administration > General > Site home settings >> Site home items when logged in frontpageloggedin you can select 'List of categories'. I want this list to be shown to all users.



Right now, I can only make it work/visible by giving someone the 'Course creator' role. Which is not something I want everyone to have.

I opened up the permissions for 'Course creator' with next to it 'Student' to find out where the differences are. I also tried changing the  'Context types' to include system, category and more. 

However, I can't find the setting that shows course categories, because the one that I thought it was, doesn't do anything: View course category and courses within it (moodle/category:viewcourselist). Even when setting this to 'Allow' for students, students still can't see the categories and course creators still can...



I hope I was able to be a bit more clear in what it is I'm looking for. If not, do let me know ;)
In reply to Indra Van Caesbroeck

Re: Managing and displaying 'Course categories'

by Mary Cooch (personal account) -
Picture of Documentation writers Picture of Testers
OK - referring to your number 2 for the time being:
I have tested on two of my own sites and regular users (such as student) do see the course categories list as they should when it is selected in 'Site home items when logged in'. This is without any changes to any of the default roles - in any context. If you want to try it, go to our 4.3 sandbox https://sandbox.moodledemo.net/ - make a couple of categories - and set the Site home as you want it and then log in with the student login.
What is your default site home role?
Also (re your number 1 and reference to the capability moodle/category:viewcourselist, perhaps this might be of interest: Course list viewer role
Average of ratings: Useful (1)
In reply to Indra Van Caesbroeck

Re: Managing and displaying 'Course categories'

by Gregor McNish -
Something to understand is that users only have roles in a context, ie a user is a student in a course, but not otherwise.
So when looking at the front page the user is in the system context -- so what they can do there depends on the default role (that's what Mary is asking).

On the front page settings there's a special setting for Default site home role, which can be different than the role used in other contexts.