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

Fatal error if a user is deleted and they have a cohot role the task of cohort role is blocked by it

XMLWordPrintable

    • MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
    • MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-78322-401
    • MDL-78322-402
    • Hide

      Setup (before MDL-78322)

      1. Using current master/stable branch (e.g. that prior to the one being tested in this issue)
      2. Install site
      3. Log in as admin
      4. Create three new users
        • User 1
        • User 2
        • User 3
      5. Create cohort
      6. Add yourself to the new cohort
      7. Navigate to Users > Permissions > Define roles from site administration
      8. Edit the Manager role
      9. Select User from Context types where this role may be assigned and save changes
      10. Navigate to Users > Permissions > Assign user roles in context in site administration
      11. Select users 1-3 in Select users to assign role
      12. Select role: Manager
      13. Select cohorts: new cohort
      14. Press Assign
      15. Navigate to Users > Accounts > Browse list of users
      16. Delete User 1

      Test MDL-78322

      1. Check out branch
      2. Run upgrade step
      3. Navigate to Users > Permissions > Assign user roles in context in site administration
      4. Confirm Existing cohort role assignments table no longer shows User 1
      5. Navigate to Users > Accounts > Browse list of users
      6. Delete User 2
      7. Navigate to Users > Permissions > Assign user roles in context in site administration
      8. Confirm Existing cohort role assignments table no longer shows User 2
      9. Navigate to Server > Tasks > Scheduled tasks in site administration
      10. Execute the Sync cohort role assignments task (press Run now)
      11. Confirm task executes successfully
      12. Navigate to Preferences from user menu
      13. Press Roles > Assign roles relative to this user
      14. Confirm User 3 has the Manager role
      Show
      Setup (before MDL-78322 ) Using current master/stable branch (e.g. that prior to the one being tested in this issue) Install site Log in as admin Create three new users User 1 User 2 User 3 Create cohort Add yourself to the new cohort Navigate to Users > Permissions > Define roles from site administration Edit the Manager role Select User from Context types where this role may be assigned and save changes Navigate to Users > Permissions > Assign user roles in context in site administration Select users 1-3 in Select users to assign role Select role: Manager Select cohorts: new cohort Press Assign Navigate to Users > Accounts > Browse list of users Delete User 1 Test MDL-78322 Check out branch Run upgrade step Navigate to Users > Permissions > Assign user roles in context in site administration Confirm Existing cohort role assignments table no longer shows User 1 Navigate to Users > Accounts > Browse list of users Delete User 2 Navigate to Users > Permissions > Assign user roles in context in site administration Confirm Existing cohort role assignments table no longer shows User 2 Navigate to Server > Tasks > Scheduled tasks in site administration Execute the Sync cohort role assignments task (press Run now ) Confirm task executes successfully Navigate to Preferences from user menu Press Roles > Assign roles relative to this user Confirm User 3 has the Manager role
    • 1
    • Team Hedgehog 2023 Sprint 2.2

      If a user have a role inside a cohort and he is deleted the taks that syncronize cohort roles is blocked

      plugin:cohortroles

      task: cohort_role_sync

       

      Steps to reproduce

      1. Create a user
      2. put him in a cohort
      3. put him in a role inside the cohort
      4. delete the user
      5. run the task

            pholden Paul Holden
            EsdrasCaleb Esdras Caleb Oliveira Silva
            Stevani Andolo Stevani Andolo
            Huong Nguyen Huong Nguyen
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 20 minutes
                4h 20m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.