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

Error when upgrading self-conversations with deleted users

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.7
    • Fix Version/s: 3.7
    • Component/s: Messages
    • Labels:
    • Testing Instructions:
      Hide

      A. Create a new Moodle 3.4.x site

      1. Login as admin.
      2. Check that "Enable messaging system (messaging)" is enabled.
      3. Create 1 user (admin2).
      4. Access to "Site administration > Users > Permissions > Site administrators" and add "admin2" as admin.
      5. Login as admin2.
      6. From "Site administration > Users > Accounts > Bulk user actions", add admin and admin2 to the selection, choose "Send a message", write any text on the message body (for instance "This is a bulk message sent by the ADMIN2"), click over the "Save changes" button and confirm you want to send the message to all these users.
      7. Logout.

      B. Upgrade to Moodle 3.6

      1. Upgrade the code from 3.4 to 3.6.
      2. Log in as admin.
      3. Go to "Site administration > Users > Accounts > Add a new user".
      4. Add several users (s1, s2, s3 and admin3).
      5. Access to "Site administration > Users > Permissions > Site administrators" and add "admin3" as admin.
      6. Login as admin3.
      7. From "Site administration > Users > Accounts > Bulk user actions", add admin and admin3 to the selection, choose "Send a message", write any text on the message body (for instance "This is a bulk message sent by the ADMIN3"), click over the "Save changes" button and confirm you want to send the message to all these users.
      8. Logout.
      9. Login as admin.
      10. In "Administration > Users > Privacy and policies > Privacy settings", enable the 'Create automatic data deletion requests' privacy setting (if it's disabled).
      11. Access to "Site administration > Users > Permissions > Site administrators" and remove "admin2" and "admin3" from the managers column.
      12. Go to "Site administration > Users > Accounts > Bulk user actions".
      13. Bulk delete s1, s2, admin2 and admin3.
      14. Access to "Site administration > Server > System paths" and edit the "Path to PHP CLI" setting to include the proper php path (for instance, /usr/bin/php).
      15. Access to "Site administration > Server > Tasks > Scheduled tasks", edit the tool_dataprivacy\task\delete_existing_deleted_users'  task and enable it.
      16. Run the scheduled task to create delete data requests for pre-existing deleted users ('tool_dataprivacy\task\delete_existing_deleted_users').
      17. Go to "Site administration > Users > Privacy and policies > Data requests" and approve all requests.
      18. Run the cron. ('php admin/cli/cron.php').

      Testing scenario: upgrade to master

      1. Upgrade the code from 3.6. to master.
      2. Login as admin and follow the upgrading steps.
      3. CHECK no error is displayed during the upgrade.
      Show
      A. Create a new Moodle 3.4.x site Login as admin. Check that "Enable messaging system (messaging)" is enabled. Create 1 user (admin2). Access to "Site administration > Users > Permissions > Site administrators" and add "admin2" as admin. Login as admin2. From "Site administration > Users > Accounts > Bulk user actions", add admin and admin2 to the selection, choose "Send a message", write any text on the message body (for instance " This is a bulk message sent by the ADMIN2 "), click over the "Save changes" button and confirm you want to send the message to all these users. Logout. B. Upgrade to Moodle 3.6 Upgrade the code from 3.4 to 3.6. Log in as admin. Go to "Site administration > Users > Accounts > Add a new user". Add several users (s1, s2, s3 and admin3). Access to "Site administration > Users > Permissions > Site administrators" and add "admin3" as admin. Login as admin3. From "Site administration > Users > Accounts > Bulk user actions", add admin and admin3 to the selection, choose "Send a message", write any text on the message body (for instance " This is a bulk message sent by the ADMIN3 "), click over the "Save changes" button and confirm you want to send the message to all these users. Logout. Login as admin. In "Administration > Users > Privacy and policies > Privacy settings", enable the 'Create automatic data deletion requests' privacy setting (if it's disabled). Access to "Site administration > Users > Permissions > Site administrators" and remove "admin2" and "admin3" from the managers column. Go to "Site administration > Users > Accounts > Bulk user actions". Bulk delete s1, s2, admin2 and admin3. Access to "Site administration > Server > System paths" and edit the "Path to PHP CLI" setting to include the proper php path (for instance, /usr/bin/php ). Access to "Site administration > Server > Tasks > Scheduled tasks", edit the tool_dataprivacy\task\delete_existing_deleted_users'  task and enable it. Run the scheduled task to create delete data requests for pre-existing deleted users ( 'tool_dataprivacy\task\delete_existing_deleted_users' ). Go to "Site administration > Users > Privacy and policies > Data requests" and approve all requests. Run the cron. ( 'php admin/cli/cron.php' ). Testing scenario: upgrade to master Upgrade the code from 3.6. to master. Login as admin and follow the upgrading steps. CHECK no error is displayed during the upgrade.
    • Affected Branches:
      MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-65407-master

      Description

      In MDL-64715 an upgrading step was added to create the self-conversation to all users. We should only create it to non-deleted users, so an extra-check should be added here.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  20/May/19

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 1 hour, 35 minutes
                  1d 1h 35m