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

Event monitor: Deletion of site rules on course deletion (and debugging on rule deletion)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 2.8
    • 2.8
    • Events API
    • MOODLE_28_STABLE
    • MOODLE_28_STABLE
    • MDL-48107_master
    • Hide
      Test 1
      1. Create a rule in a course.
      2. Go to delete the rule and check on the confirmation page that there is no message about there being any subscriptions for the rule.
      3. Click cancel.
      4. Subscribe to this rule with a bunch of different users.
      5. Log in as admin and delete the rule.
      6. On the confirmation page ensure that the warning about deleting the rule also contains the number of subscriptions that would be deleted to.
      Test 2
      1. Create a course.
      2. Create a course rule.
      3. Create a site wide rule.
      4. Delete the course and ensure there is no debugging message related to "Inconsistent courseid - context combination detected".
      5. Confirm the course rule no longer exists.
      6. Confirm that the site wide rule still exists.
      Test 3
      1. Run all the unit/behat tests in admin/tool/monitor/tests.
      Show
      Test 1 Create a rule in a course. Go to delete the rule and check on the confirmation page that there is no message about there being any subscriptions for the rule. Click cancel. Subscribe to this rule with a bunch of different users. Log in as admin and delete the rule. On the confirmation page ensure that the warning about deleting the rule also contains the number of subscriptions that would be deleted to. Test 2 Create a course. Create a course rule. Create a site wide rule. Delete the course and ensure there is no debugging message related to "Inconsistent courseid - context combination detected". Confirm the course rule no longer exists. Confirm that the site wide rule still exists. Test 3 Run all the unit/behat tests in admin/tool/monitor/tests.

      First of all, I noticed that when I delete the rule I am not warned about the number of existing subscriptions and that they are going also to be deleted.

      Second, I got this debugging:

      Inconsistent courseid - context combination detected.
       
          line 247 of /lib/classes/event/base.php: call to debugging()
          line 198 of /admin/tool/monitor/classes/subscription_manager.php: call to core\event\base::create()
          line 116 of /admin/tool/monitor/classes/rule_manager.php: call to tool_monitor\subscription_manager::remove_all_subscriptions_for_rule()
          line 85 of /admin/tool/monitor/classes/rule.php: call to tool_monitor\rule_manager::delete_rule()
          line 94 of /admin/tool/monitor/managerules.php: call to tool_monitor\rule->delete_rule()
      

            markn Mark Nelson
            marina Marina Glancy
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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