Users getting an error when trying to access a course they are not enrolled in

Users getting an error when trying to access a course they are not enrolled in

by Thomas Maskell -
Number of replies: 4

Hi

if users try to access a course they are not enrolled in they get a weird error. Is this normal on moodle or is something broken?

Moodle 4.0.3+ (Build: 20220909)Error users are getting

Average of ratings: -
In reply to Thomas Maskell

Re: Users getting an error when trying to access a course they are not enrolled in

by Randy Thornton -
Picture of Documentation writers
Is this only happening when the course is one with a single activity format? I can't replicate this in such a course as it works as expected for me, but I wonder if this is issue related to this Tracker MDL-73532 which added the secondary navigation to single activity courses in 4.0.

The error message above shows that this error is happening when trying to load the secondary menu in a single activity course. I wonder if this can happen for users not enrolled or who don't have role assignments in the course or some other specific condition.

Anyone familiar with the details of this process want to chime in?
In reply to Randy Thornton

Re: Users getting an error when trying to access a course they are not enrolled in

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
In reply to Mary Cooch

Re: Users getting an error when trying to access a course they are not enrolled in

by Thomas Maskell -
Hi, This looks like exactly the issue! spent about 20 mins earlier googling to see if other had had the issue but to no avail! it was a single activity format and the symptoms look exactly the same
In reply to Mary Cooch

Re: Users getting an error when trying to access a course they are not enrolled in

by Randy Thornton -
Picture of Documentation writers
Thanks, Mary. If I turn on Guest for the course, I see the error too. Looks like it will be fixed in the next point release.