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

Improve event classes deprecation

XMLWordPrintable

    • MOODLE_27_STABLE, MOODLE_31_STABLE
    • MOODLE_32_STABLE
    • MDL-46214-master
    • Hide
      1. Create a new event monitor subscription on Core => Access control created
      2. Ensure that you can create the rule, view it, edit it, etc.
      3. Open lib/classes/event/mnet_access_control_created.php in your editor of choice and add the following to it:

        public static function is_deprecated() {
            return true;
        }
        

      4. Refresh the event monitor list - the subscription should now warn that it is no longer in use
      5. View and edit the rule
        1. Confirm that you can see the event in the dropdown list and that it shows as being no longer relevant
      6. Change it to point to a new event and save changes
      7. Edit the event again
        1. Confirm that you cannot find the deprecated event in the dropdown list
      8. Click to create a new rule - you should not be able to select this rule from the list of events
      9. Continue with creation of a new rule, save it, and then edit it
        1. Confirm that you cannot find the deprecated event in the dropdown list
      Show
      Create a new event monitor subscription on Core => Access control created Ensure that you can create the rule, view it, edit it, etc. Open lib/classes/event/mnet_access_control_created.php in your editor of choice and add the following to it: public static function is_deprecated() { return true; } Refresh the event monitor list - the subscription should now warn that it is no longer in use View and edit the rule Confirm that you can see the event in the dropdown list and that it shows as being no longer relevant Change it to point to a new event and save changes Edit the event again Confirm that you cannot find the deprecated event in the dropdown list Click to create a new rule - you should not be able to select this rule from the list of events Continue with creation of a new rule, save it, and then edit it Confirm that you cannot find the deprecated event in the dropdown list

      We already have two deprecated event classes content_viewed and course_module_instances_list_viewed that display debugging message when file is included.

      We should find the better way to deprecate it, especially now when MDL-43365 is integrated.

      This will also make it possible to avoid all debugging dancing in MDL-46155

      There was an attempt to deprecate two events in MDL-18592 but it got blocked by this issue because there is no reasonable way to exclude deprecated events from event monitor and indicate that they are deprecated in the events list. "Deprecated" events should no longer be triggered (and there is no reason to observe them) but the events code should still be present to allow restoring of logs.

            dobedobedoh Andrew Lyons
            marina Marina Glancy
            Marina Glancy Marina Glancy
            Dan Poltawski Dan Poltawski
            Mark Nelson Mark Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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