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

Incorrect user assignment count when deleting roles

    XMLWordPrintable

    Details

    • Database:
      Any
    • Testing Instructions:
      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."
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      master_MDL-45623

      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

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Jul/14