Moodle 3.2 How may I prevent visible courses in hidden categories from appearing on the Front Page?

Moodle 3.2 How may I prevent visible courses in hidden categories from appearing on the Front Page?

by S. Ali -
Number of replies: 3

Hello,

Moodle: 3.2.1+ (Build: 20170209)

In previous versions of Moodle (up to 3.1) I have been able to prevent a course from being displayed on the Front Page by placing it in a hidden category.This no longer seems to work on my 3.2 install and all open/visible course are displayed on the Front page even if it is within a category which is hidden.

For example, there is a course which set up as a Staff Room which may be accessed by teachers who are manually enrolled into the course. This course is in a category which is hidden and until Moodle 3.1 the Staff Room course would not be displayed on the Front Page.

However in Moodle 3.2 it is being displayed once the course is open/visible, regardless of the category being hidden or not.

I've checked the forums and the Moodle docs for 3.2 but can't seem to find anything on this issue. I'm not sure if I'm missing something. Any help would be greatly appreciated.

I am testing with the Adaptable theme but have also tried it with Essential, Boost, Clean, More and Fordson with the same result. Hence, I don't think it's theme-related.

Many thanks in advance.

Regards,

s.ali

Average of ratings: -
In reply to S. Ali

EDITED | Re: Moodle 3.2 How may I prevent visible courses in hidden categories from appearing on the Front Page?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Ali,

Thanks for your message.

My first thoughts are that I think the most likely problem here is that if you are using the Boost theme, or a Boost theme derivative, then it is more than likely a styling issue in that the body classes for such things as hidden categories has not been accounted for in this new breed of themes, in which case this looks like it needs reporting in Moodle Tracker/

If you could send me a link to your site I could find out what CSS you are missing then you can add that into the themes settings page.

Just a thought...have you checked to see that you have not allowed courses in hidden categories in your site's FRONTPAGE SETTINGS?

Read this: https://docs.moodle.org/32/en/Course_categories#Hiding_categories

 

Hope that helps?

Mary

 

In reply to Mary Evans

Re: EDITED | Re: Moodle 3.2 How may I prevent visible courses in hidden categories from appearing on the Front Page?

by S. Ali -

Hello Mary,

Thank you very much for promptly looking into this.

I'm using the Adaptable theme, but have tried with the other themes mentioned with the same result.

I think that the setting to allow course in hidden categories has been removed as it's not in the 3.2 docs. I came across it when looking into the issue earlier and I saw reference to: MDL-26002 which seems to say that the setting was removed for performance reasons.

Your reply was very helpful though as I realized that it is something with that particular moodle installation as I checked it on my test 3.2 installation (which I forgot I'd upgraded to 3.2 as well) and it works as expected there.

So I'm having a look around to see if I find anything amiss before sending you the link to the site as I know you're usually very busy helping many of us out in the Themes forum.

Thanks again and I'll keep you posted.

Regards,

s.ali

In reply to S. Ali

Re: EDITED | Re: Moodle 3.2 How may I prevent visible courses in hidden categories from appearing on the Front Page?

by S. Ali -

Hello,

I think I have discovered what the problem is.

It seems that the Front page setting "List of courses" gives a listing of all available (non-hidden) courses regardless of whether the category is hidden or not. Perhaps this is what was meant in MDL-26002, where it says that the "Allow visible courses in hidden categories" setting is now always enabled.

Additionally, what led to my problem in thinking that it worked up to version 3.1 and on my test 3.2 site, was that I was comparing apples to oranges! On the other sites the Front page setting was set to display a "List of categories" and not courses, and this works as if the "Allow visible courses in hidden categories" setting is disabled and gives the results I would like to achieve.

Now I just need to find a possible workaround as the "List of courses" is what is required in Adaptable to display the courses in the tiled format.

Possible workarounds thus far:

If there are any other suggestions they would be most welcomed.

Thank you very much for your assistance and I hope this may be of benefit to others.

Regards,

s.ali