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

Incorrect user assignment count when deleting roles

    XMLWordPrintable

Details

    • Any
    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • master_MDL-45623
    • Hide
      1. Create a new role
      2. Allow the role to be assigned in the system and category contexts
      3. Click 'Assign system roles' and assign the role to a user in the system context
      4. Enter the 'Miscellaneous' category and assign the same user the role in the category context
      5. Return to define roles and click the delete icon for the test role.
      6. The confirmation message should read: ""Currently this role is assigned to 1 users."
      Show
      Create a new role Allow the role to be assigned in the system and category contexts Click 'Assign system roles' and assign the role to a user in the system context Enter the 'Miscellaneous' category and assign the same user the role in the category context Return to define roles and click the delete icon for the test role. The confirmation message should read: ""Currently this role is assigned to 1 users."

    Description

      The "role delete" confirmation page currently reports the wrong number of users assigned to a role, if a user is assigned to the same role in multiple contexts.

      Steps to reproduce

      1. Create a new role
      2. Allow the role to be assigned in the system and category contexts
      3. Click 'Assign system roles' and assign the role to a user in the system context
      4. Enter the 'Miscellaneous' category and assign the same user the role in the category context
      5. Return to define roles and click the delete icon for the test role.

      What happens

      The confirmation message reads "Currently this role is assigned to 2 users."

      What should happen

      The confirmation message should read "Currently this role is assigned to 1 users."

      Attachments

        Issue Links

          Activity

            People

              simoncoggins Simon Coggins
              simoncoggins Simon Coggins
              Marina Glancy Marina Glancy
              Sam Hemelryk Sam Hemelryk
              Sam Hemelryk Sam Hemelryk
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/Jul/14