Customize course overview block

Customize course overview block

by Sarath P -
Number of replies: 7

Hello everyone,

Is it possible to display all the enrolled courses except for a set of courses under a separate category in the course overview block?

For example, we have two categories. Category 1 and 2. There are 5 courses in which 3 courses are under category 1 and the other 2 courses are under category 2. Let's assume that a user is enrolled in all 5 courses and in his course overview block, there will be 5 courses, which is correct. 

However, the user should not see the courses from category 2 in his course overview block.

Moodle version 4

Thanks in Advance

Average of ratings: -
In reply to Sarath P

Re: Customize course overview block

by Mark Sharp -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
No. That sounds like a very specific use case. You can either not enrol the person in the category 2 courses, or the user can hide (Archive) the courses they don't want to see. If the user doesn't have permissions to view hidden courses, you could perhaps hide the course.

If you use course custom fields, you can add one field to the course overview block, and the user can filter on that selection. Other than that you would need to recode it to your purposes (not recommended for core code).
In reply to Mark Sharp

Re: Customize course overview block

by Sarath P -
Hi Mark,
Thank you for your response. I am sorry. I forgot to mention one thing. Why I am trying to remove the category 2 courses from displaying in the course overview block is that there will be a separate page to display the category 2 courses. So from a student's perspective, he could see and access the category 2 courses from the block as well as from the new page. To avoid this course listing I am trying to restrict or hide the other courses.

Is there any other way to archive all the courses in category 2 so that users don't need to archive the courses by themselves?
In reply to Sarath P

Re: Customize course overview block

by Mark Sharp -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
There is an alternative block you could use: https://moodle.org/plugins/block_filtered_course_list. This would allow you to filter based on categories etc. I don't know if this can replace "My courses" page in Moodle 4 - but it can be used on the dashboard.
In reply to Mark Sharp

Re: Customize course overview block

by Sarath P -
I have tried that. Instead of a drop-down list of courses, is it possible to display them in a card layout?
In reply to Sarath P

Re: Customize course overview block

by Mark Sharp -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
I don't believe so. It's not my plugin, but it's always worth asking the maintainer.
In reply to Sarath P

Re: Customize course overview block

by Andreas Schenkel -
Picture of Plugin developers
Maybe this ist something that can help for this problem.

https://moodle.org/plugins/block_course_list_advanced

But it does not support categorys.
In reply to Andreas Schenkel

Re: Customize course overview block

by Sarath P -
Thank you for your response. Let me install the plugin and see.