Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 1.7.4, 1.8.4, 1.9, 2.0
-
Fix Version/s: 2.0
-
Component/s: Roles / Access
-
Labels:None
-
Affected Branches:MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE
-
Fixed Branches:MOODLE_20_STABLE
Description
I have been thinking about this for a while. Course:view capability currently does 2 things
1) It allows users to actually see the course and
2) It is a flag that we use for defining participants/enrolments
Most of the times, combining them makes perfect sense, if you can see a course, then you are a participant. However, at some other times, there is no distinction between a participant, and a user who is able to monitor courses but do not qualify as participant (e.g. course creators, MDL-11761).
My proposal is to split course:view into course:view and course:participate. Without doing this is is hard to make users able to view a course without making them "enrolled" in a course, which might not be what people wanted. If we split these then it is possible to make a higher level role at system or course category to give people 'view' ability across all the child courses but without making them participants.
Most of the existing code should still check for course:view for capability to view course but get_my_courses() should then only return courses in which users have course:participate capability most of the time (requires some checking). Participants page should only list roles with course:participate capability. Mymoodle page should only list courses with course:participate.
The migration will just duplicate the existing role definitions and overrides, i.e. make a course:participate whenever there is a course:view. This will not change how things work.
I do not think this will be very straight forward so I just want to get a general feeling of whether this should be attempted at all.
Attachments
Issue Links
| This issue will help resolve: | ||||
| MDL-11738 | forum:initialsubscriptions Role doesn't work for forums that are set to "Force Everyone to be Subscribed" |
|
|
|
| MDL-16316 | Users with admin role assigned at the system level show up on participants drop down list for recent activity in courses they are not enrolled in. |
|
|
|
| MDL-11343 | Hidden role assignment at site showing in participants list |
|
|
|
| MDL-16332 | Course Creators Appear in Group Potential Member List |
|
|
|
| MDL-18890 | Enable other roles besides administrator to impersonate users without adding all classes to My Courses block |
|
|
|
| MDL-11761 | Allow Teacher role to view all course pages without enrolling and without them courses being listed in 'My Courses' |
|
|
|
| This issue has a non-specific relationship to: | ||||
| MDL-8902 | get_my_courses returns all courses with permission to access, not just enrolled courses |
|
|
|
| This issue has been marked as being related by: | ||||
| MDL-17949 | List of problems related to potential enrolment rewrite in 2.0 - META |
|
|
|
Our site would benefit greatly from this proposed change. It makes sense in my mind to separate :view and :participate, because our teaching staff need view rights to all other timetabled courses without all courses being listed in the My Courses block. I'd be very keen to see this implemented in 2.0.