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

Event monitor: Do not allow to edit rule if subscriptions exist

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.8
    • 2.8
    • Events API
    • MOODLE_28_STABLE
    • MOODLE_28_STABLE
    • MDL-47892-master
    • Hide
      Manual test
      1. Go to Site Administration > Reports > Event monitoring rules.
      2. Add a new rule.
      3. On the event list click on edit icon.
      4. Make sure you're able to select any plugin and event
      5. Go to subscriptions page and subscribe to this rule.
      6. Go to Site Administration > Reports > Event monitoring rules.
      7. Again, click on the edit icon.
      8. Make sure you're NOT able to select any plugin and event
      9. Return to subscription page and unsubscribe of this rule.
      10. Go to Site Administration > Reports > Event monitoring rules.
      11. Again, click on the edit icon.
      12. Make sure you're able to select any plugin and event
      Unit test
      1. Run: vendor/bin/phpunit admin/tool/monitor/tests/subscription_manager_test.php and make sure it pass.
      Show
      Manual test Go to Site Administration > Reports > Event monitoring rules. Add a new rule. On the event list click on edit icon. Make sure you're able to select any plugin and event Go to subscriptions page and subscribe to this rule. Go to Site Administration > Reports > Event monitoring rules. Again, click on the edit icon. Make sure you're NOT able to select any plugin and event Return to subscription page and unsubscribe of this rule. Go to Site Administration > Reports > Event monitoring rules. Again, click on the edit icon. Make sure you're able to select any plugin and event Unit test Run: vendor/bin/phpunit admin/tool/monitor/tests/subscription_manager_test.php and make sure it pass.

      Imagine situation:

      • Rule is created to monitor assignment submission.
      • Teacher subscribed to monitor submission of particular assignment activity.
      • Admin (or another teacher) edits the rule and changes it to minotor forum posts.

      The existing subscriptions will point to the activity of completely different type. They will hopefully break and not work at all.

      We need to lock editing of the most fields in the rule if subscriptions exist. Deleting of the rule should delete all related subscriptions (I hope this is already implemented).

            lameze Simey Lameze
            marina Marina Glancy
            Frédéric Massart Frédéric Massart
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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