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

Course/activity calendar events are deleted when the teacher who created them requests their data to be deleted

XMLWordPrintable

    • MOODLE_37_STABLE
    • MOODLE_310_STABLE, MOODLE_39_STABLE
    • MDL-67494-master
    • Hide

      Before the upgrade

      For this test it is required to have a course with few users enrolled (at least one as teacher) and a group.

      1. Log in as admin and go to calendar.
      2. Create a site and category events.
      3. Go to Site administration > Users > Privacy and policies > Privacy settings.
      4. Enable Contact the privacy officer tool_dataprivacy | contactdataprotectionofficer setting and save.
      5. Create a course and enrol teacher user, s1 and s2 as students.
      6. Create 2 groups in the course.
      7. Log in as a teacher and go to calendar.
      8. Create course, group and user events.
      9. Click Manage subscriptions and add one  course subscription with the following url as Calendar URL
        • https://calendar.google.com/calendar/ical/en.usa%23holiday%40group.v.calendar.google.com/public/basic.ics

      10. Go to the course and add a new assignment.
      11. On the assignment menu, select User overrides and then click Add user override.
      12. Select any user, change Allow submissions from date to a date in the future and save.
      13. On the assignment menu again, select Group overrides and then click Add group override.
      14. Create group overrides for one or two groups in the course.
      15. Select any group, change the dates to a date in the future and save.
      16. Go back to the course and add a lesson and a quiz activities
      17. Repeat steps [7 to 11] above and add a user and a group overrides for lesson and quiz.
      18. Look the mdl_event table, please note that all events have the userid set to a number different of zero (userid of the user who created the event).
      19. Look the mdl_event_subscriptions table, please note that all events subscriptions have the userid set to a number different of zero.
      20. Login as student 1
      21. Click Manage subscriptions and add one user subscriptions with different with the following url as Calendar URL
        • https://calendar.google.com/calendar/ical/en.usa%23holiday%40group.v.calendar.google.com/public/basic.ics

      After upgrade

      1. Look the mdl_event table and make sure the only events that have a userid set are the user and user overrides type of events.
        • All shared events (site, category, course, group, group overrides) should have been updated to set userid to zero.
      2. Look the mdl_event_subscriptions table, make sure the only subscription that have a userid set are the subscription of user type of events.
      3. Repeat the steps [1 to 13] from the test above.
      4. Look the mdl_event table and make sure that all shared events (site, category, course, group, group overrides) have the userid field set to zero.
      5. Look the mdl_event_subscription and make sure that only user type of subscription should have the user id set, the course type of subscription should have userid set to zero.

      Data request test

      1. Log in as teacher who created the events above and go to your profile page.
      2. Under Privacy and policies section, click Data requests > New request.
      3. Set Type field to Export all my personal data and save.
      4. In another window, log in as admin and go to Site administration > Users > Privacy and policies > Data requests
      5. Approve the request made by the user
      6. Run cron.
      7. As teacher, go to your profile page > Data requests.
      8. Note the request has Download ready status, under Actions menu, click Download.
      9. Open the zip file and extract the content.
      10. In the extracted files, go to System_.1 > User USERFULLNAME_.USERID > Calendar > Events folder.
      11. Go through the directories, opening each js/json file and make sure it is related to a user/user override event.
      12. In the extracted files, go to System_.1 > User USERFULLNAME_.USERID > Calendar > Subscriptions folder.
      13. Go through the js/json file and make sure it is related to a user type of subscription.
      14. As teacher, go to your profile page > Data requests.
      15. Set Type field to Delete all of my personal data and save.
      16. In another window, as admin and go to Site administration > Users > Privacy and policies > Data requests
      17. Approve the Delete data request made by the user and run cron
      18. Query the mdl_event and mdl_event_subscriptions and make sure all user personal (user/user overrides) have been removed.
      19. Make sure the shared events (site, category, course, group, group overrides) still exists.

       

      Show
      Before the upgrade For this test it is required to have a course with few users enrolled (at least one as teacher) and a group. Log in as admin and go to calendar. Create a site and category events. Go to Site administration > Users > Privacy and policies > Privacy settings . Enable Contact the privacy officer tool_dataprivacy | contactdataprotectionofficer setting and save. Create a course and enrol teacher user, s1 and s2 as students. Create 2 groups in the course. Log in as a teacher and go to calendar. Create course , group and user events . Click Manage subscriptions and add one   course  subscription with the following url as Calendar URL :  https://calendar.google.com/calendar/ical/en.usa%23holiday%40group.v.calendar.google.com/public/basic.ics Go to the course and add a new assignment . On the assignment menu, select User overrides and then click Add user override . Select any user, change Allow submissions from date to a date in the future and save. On the assignment menu again, select Group overrides and then click Add group override . Create group overrides for one or two groups in the course. Select any group, change the dates to a date in the future and save. Go back to the course and add a lesson and a quiz activities Repeat steps [7 to 11] above and add a user and a group overrides for lesson and quiz. Look the mdl_event table, please note that all events have the userid set to a number different of zero (userid of the user who created the event). Look the mdl_event_subscriptions table, please note that all events subscriptions have the userid set to a number different of zero. Login as student 1 Click Manage subscriptions and add one user subscriptions with different with the following url as Calendar URL :  https://calendar.google.com/calendar/ical/en.usa%23holiday%40group.v.calendar.google.com/public/basic.ics After upgrade Look the mdl_event table and make sure the only events that have a userid set are the user and user overrides type of events. All shared events (site, category, course, group, group overrides) should have been updated to set userid to zero . Look the mdl_event_subscriptions table, make sure the only subscription that have a userid set are the subscription of user type of events. Repeat the steps [1 to 13] from the test above. Look the mdl_event table and make sure that all shared events (site, category, course, group, group overrides) have the userid field set to zero . Look the mdl_event_subscription and make sure that only user type of subscription should have the user id set, the course type of subscription should have userid set to zero. Data request test Log in as teacher who created the events above and go to your profile page . Under Privacy and policies section, click Data requests > New request . Set Type field to Export all my personal data and save. In another window, log in as admin and go to Site administration > Users > Privacy and policies > Data requests Approve the request made by the user Run cron. As teacher, go to your profile page > Data requests. Note the request has Download ready status, under Actions menu, click Download . Open the zip file and extract the content. In the extracted files, go to System_.1 > User USERFULLNAME_.USERID > Calendar > Events folder. Go through the directories, opening each js/json file and make sure it is related to a user/user override event. In the extracted files, go to System_.1 > User USERFULLNAME_.USERID > Calendar > Subscriptions folder. Go through the js/json file and make sure it is related to a user type of subscription. As teacher, go to your profile page > Data requests. Set Type field to Delete all of my personal data and save. In another window, as admin and go to Site administration > Users > Privacy and policies > Data requests Approve the Delete data request made by the user and run cron Query the mdl_event and mdl_event_subscriptions and make sure all user personal (user/user overrides) have been removed. Make sure the shared events (site, category, course, group, group overrides) still exists.  
    • 1
    • International 4.0 - Sprint 4, International 4.0 - Sprint 5, International 4.0 - Sprint 6, International 4.0 - Sprint 7, Internationals - 3.11 Sprint 1, Internationals - 3.11 Sprint 2, Internationals - 3.11 Sprint 3, Internationals - 3.11 Sprint 4, Internationals - 3.11 Sprint 5, Internationals - 3.11 Sprint 6, Internationals - 3.11 Sprint 7

      Given that "Contact privacy officer" is turned on
      And I log in as a teacher enrolled in Course A
      And I create a course event
      And I create an assignment with a due date
      And I create a group event for Group A
      And I go to my profile
      And I click on "Delete my account"
      And I submit my request
      And the privacy officer approves my deletion request
      When cron runs and my account gets deleted
      And I log in as a student enrolled in Course A and a member of Group A
      And I go to Course A's calendar
      Then I should see the course event
      And I should see Group A's event
      And I should see the assignment's due date event
      But I cannot see those events anymore because they have already been deleted.

      I think that the user ID should only be set for user-type calendar events and subscriptions so these shared calendar events and subscriptions won't be tied to the user who created them. If we want to track who created the calendar event/subscription, then the logs should be able to tell us that.

        1. After-patch-Step1,4.png
          After-patch-Step1,4.png
          9 kB
        2. After-patch-Step2,5.png
          After-patch-Step2,5.png
          9 kB
        3. Before-patch-Step18.png
          Before-patch-Step18.png
          9 kB
        4. Before-patch-Step19.png
          Before-patch-Step19.png
          10 kB
        5. Data-request-step11.png
          Data-request-step11.png
          8 kB
        6. Data-request-step13.png
          Data-request-step13.png
          10 kB
        7. Data-request-step18,19.png
          Data-request-step18,19.png
          12 kB
        8. Data-request-step8.png
          Data-request-step8.png
          25 kB
        9. MDL-67494.jpg
          MDL-67494.jpg
          76 kB
        10. MDL-67494 (2).jpg
          MDL-67494 (2).jpg
          68 kB
        11. MDL-67494 category event error.png
          MDL-67494 category event error.png
          237 kB

            lameze Simey Lameze
            jpataleta Jun Pataleta
            Jun Pataleta Jun Pataleta
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Ilya Tregubov Ilya Tregubov
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 weeks, 4 days, 3 hours, 54 minutes
                2w 4d 3h 54m

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