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

Final deprecation of get_module_metadata + get_shortcuts

    XMLWordPrintable

    Details

      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

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            jaked Jake Dallimore
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: