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

Final deprecation of get_module_metadata + get_shortcuts

    XMLWordPrintable

Details

    • MOODLE_39_STABLE
    • MOODLE_401_STABLE
    • MDL-68011-master
    • Hide
      1. Confirm that all unit tests are passing.
      2. Review the following commit and confirm that the function get_module_metadata() is deprecated properly.
      3. Search through the code and confirm that get_module_metadata() is not being used anywhere
        (except in the function declaration in lib/deprecatedlib.php and the upgrade note in lib/upgrade.txt)
      4. Review the following commit and confirm that the callback function get_shortcuts() and its implementations are deprecated properly.
      5. Search through the code and confirm that the callback get_shortcuts is not being used anywhere.
        (except in the relevant deprecatedlib.php and upgrade.txt files)
      6. Review the following commit and confirm that the function course_modchooser() is deprecated properly.
      7. Search through the code and confirm that course_modchooser() is not being used anywhere
        (except in the function declaration in course/renderer.php and the upgrade note in course/upgrade.txt)
      Show
      Confirm that all unit tests are passing. Review the following commit and confirm that the function get_module_metadata() is deprecated properly. Search through the code and confirm that get_module_metadata() is not being used anywhere (except in the function declaration in lib/deprecatedlib.php and the upgrade note in lib/upgrade.txt ) Review the following commit and confirm that the callback function get_shortcuts() and its implementations are deprecated properly. Search through the code and confirm that the callback get_shortcuts is not being used anywhere. (except in the relevant deprecatedlib.php and upgrade.txt files) Review the following commit and confirm that the function course_modchooser() is deprecated properly. Search through the code and confirm that course_modchooser() is not being used anywhere (except in the function declaration in course/renderer.php and the upgrade note in course/upgrade.txt )
    • 1
    • 4.1 deprecations and cleaning, 4.1 deprecations and cleanin 2

    Description

      This is a callback previously used by the get_module_metadata function (deprecated in 3.9) and also by that method's replacement, the content_item_service class, where it was called as a legacy fallback.

      The intention was to deprecate the callback in 3.9 as part of MDL-67585, however, deprecating a method and a callback which it calls at the same time proved to be tricky to do using normal process. Any unit tests would fail due to debugging being called twice. So, the calling method was deprecated (get_module_metadata) and the debugging was called for any code calling the get_shortcuts method.

      In this issue we should:

      1. Final deprecation of the get_module_metadata function - i.e just throw exception and strip method out. This may have already been done in MDL-67345
      2. Move lti_get_shortcuts to lib/deprecatedlib, throw an exception, and  remove the @todo note from its doc block.
      3. Remove any references to get_module_metadata in core (there should already be none)
      4. Remove any references to get_shortcuts callback in core (there should be 1 - in the content_item_readonly_repository::find_all_for_course method). Just remove the entire else if starting with:

      else if (component_callback_exists('mod_' . $mod->name, 'get_shortcuts')) 

      Attachments

        1. MDL-68011_step 2.webm
          1016 kB
        2. MDL-68011_step 3.webm
          438 kB
        3. MDL-68011_step 4.webm
          2.80 MB
        4. MDL-68011_step 5.webm
          787 kB
        5. MDL-68011_step 6.webm
          293 kB
        6. MDL-68011_step 7.webm
          319 kB

        Issue Links

          Activity

            People

              Geshoski Mihail Geshoski
              jaked Jake Dallimore
              Jake Dallimore Jake Dallimore
              Jun Pataleta Jun Pataleta
              Angelia Dela Cruz Angelia Dela Cruz
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 hours, 55 minutes
                  5h 55m

                  Clockify

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