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

Deletion of courses with subscriptions breaks "current subscriptions" page

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      before upgrade:

      1. create event monitoring rule on site level (as admin)
      2. create two courses
      3. subscribe to this rule in both courses (as a student)
      4. as admin delete one course
      5. as a student view your subscriptions page - it should throw an error
      6. upgrade
      7. make sure you can view remaining subscriptions as a student
      8. make sure there are no entries in tool_monitor_subscriptions table for the deleted courses and the logs report shows that they were deleted
      Show
      before upgrade: create event monitoring rule on site level (as admin) create two courses subscribe to this rule in both courses (as a student) as admin delete one course as a student view your subscriptions page - it should throw an error upgrade make sure you can view remaining subscriptions as a student make sure there are no entries in tool_monitor_subscriptions table for the deleted courses and the logs report shows that they were deleted
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Pull Master Branch:
      wip-MDL-55547-master
    • Sprint:
      3.3 sprint 3

      Description

      To reproduce -

      1. create a site rule for monitoring
      2. create a course
      3. subscribe to the event monitoring rule for that course
      4. delete the course, without first unsubscribing from the rule
      5. visit the user's event monitoring page (dashboard > preferences > event monitoring)

      Under these circumstances, I am getting an error - "Can not find data record in database table course"

      It seems that the problem is caused by records not being removed from mdl_tool_monitor_subscriptions when the corresponding course is deleted from the site.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marina Marina Glancy
              Reporter:
              mjr66 Mat Ridley
              Peer reviewer:
              Simey Lameze
              Integrator:
              Andrew Nicols
              Tester:
              Jake Dallimore
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/Mar/17