Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-11798

separation of course:view capability

    XMLWordPrintable

    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

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              lazyfish Yu Zhang
              Tester:
              Nobody
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              59 Vote for this issue
              Watchers:
              30 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10