Students still able to access courses after self-enrollment is disabled (Moodle 2.4.8)

Students still able to access courses after self-enrollment is disabled (Moodle 2.4.8)

by Brian Warling -
Number of replies: 1

We're running Moodle 2.4.8, and I've recently noticed an issue I can't explain. I can't figure out what we may have done to cause this, and am hoping someone will have some insights.

Students are still able to access courses they self-enrolled in even if self-enrollment is disabled (in Enrollment Methods). It's my understanding that in 2.4.8, self-enrolled students should no longer be able to access a course once self-enrollment has been disabled (this is how it works on a local server I'm running).

It's possible that we may have done something to our installation beyond what can be configured in the administration options, but before we begin to investigate this, I want make sure there isn't something obvious I'm overlooking.

One other piece of info... when self-enrollment is enabled, students can unenroll themselves from a self-enrolled course (that's how the student role is configured). But when self-enrollment is disabled in Enrollment Methods, and students are still able to access the course, the option to unenroll is no longer present.

 

Thanks very much in advance.... Brian

Average of ratings: -
In reply to Brian Warling

Re: Students still able to access courses after self-enrollment is disabled (Moodle 2.4.8)

by Carson Tam -

Looks like there is a bug with "moodle/course:view" capability.

 

I was able to reproduce what you described above by modifying the Student role with "View courses without participation" (moodle/course:view) set to "Allow".

 

I tried this in both Moodle 2.4.9 and Moodle 2.6, as well as on Moodle Demo (demo.moodle.net).

 

According to the definition of the "moodle/course:view" capability in http://docs.moodle.org/26/en/Capabilities/moodle/course:view, a user with this capability should be able to view this course without being enrolled, but the behaviour seems to be opposite.

 

The current behaviour is that if the user has never been enrolled in this course, then s/he will not be able to view this course. But if s/he has enrolled in this course before (even the enrollment has turned off after), s/he will be able to view the course.

 

I think the correct behaviour should be if the user has this capability (moodle/course:view) set to allowed, s/he should be able to view this course whether or not s/he is enrolled.

 

Thoughts?