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,
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.