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

improve role protection and role unassignments

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.5
    • Component/s: Enrolments
    • Labels:
    • Testing Instructions:
      Hide

      1/ role protection can be tested after flatfile changes get integrated in MDL-37187


      2/ manually enrol user as "teacher"
      3/ change teacher role definition to exclude course level
      4/ try to unassign teacher role from user in course (enrol page)
      5/ assign manager role to user in course
      6/ change manager role definition to exclude course level
      7/ try to unassign manager role from user in course (other users)

      Show
      1/ role protection can be tested after flatfile changes get integrated in MDL-37187 2/ manually enrol user as "teacher" 3/ change teacher role definition to exclude course level 4/ try to unassign teacher role from user in course (enrol page) 5/ assign manager role to user in course 6/ change manager role definition to exclude course level 7/ try to unassign manager role from user in course (other users)
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w51_MDL-37302_m25_roleedit

      Description

      There is a roles_protected() method in enrolment plugins, at present it only says what kind of roles is the plugin using by default.

      I am proposing a change similar to groups API, this method would also indicate if role with component+itemid can be removed manually. This would be used in flatfile and could be also used in paypal and self enrolment.

      I have also discovered that admins can not unsassign all roles, I am going to fix it at the same time because it is the same code.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              skodak Petr Skoda
              Integrator:
              Sam Hemelryk
              Tester:
              Mark Nelson
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/May/13