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

META : Remove deprecated api function get_context_instance() and replace calls with context_XXX::instance()

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: None
    • Component/s: Libraries
    • Affected Branches:
      MOODLE_23_STABLE

      Description

      The get_context_instance() function was marked as deprecated in 2.1.

      We need to change any call to get_context_instance() to context_xxxx::instance() and then remove the get_context_instance() itself.

      There are other library functions that utilise this call. They should be changed over as well.

        Attachments

          Issue Links

          1.
          Replace get_context_instance with context_XXXX::instance() in set location (group 1) Sub-task Closed Frédéric Massart
          2.
          Replace get_context_instance with context_XXXX::instance() in set location (group 2) Sub-task Closed Frédéric Massart
          3.
          Replace get_context_instance with context_XXXX::instance() in set location (group 3) Sub-task Closed Adrian Greeve
          4.
          Replace get_context_instance with context_XXXX::instance() in set location (group 4) Sub-task Closed Ankit Agarwal
          5.
          Replace get_context_instance with context_XXXX::instance() in set location (group 5) Sub-task Closed Frédéric Massart
          6.
          Replace get_context_instance with context_XXXX::instance() in set location (group 6) Sub-task Closed Frédéric Massart
          7.
          Replace get_context_instance with context_XXXX::instance() in set location (group 7) Sub-task Closed Adrian Greeve
          8.
          Replace get_context_instance with context_XXXX::instance() in set location (group 8) Sub-task Closed Adrian Greeve
          9.
          Replace get_context_instance with context_XXXX::instance() in set location (group 9) Sub-task Closed Frédéric Massart
          10.
          Replace get_context_instance with context_XXXX::instance() in set location (group 10) Sub-task Closed Frédéric Massart
          11.
          Replace get_context_instance with context_XXXX::instance() in set location (group 11) Sub-task Closed David Monllaó
          12.
          Replace get_context_instance with context_XXXX::instance() in set location (group 12) Sub-task Closed David Monllaó
          13.
          Replace get_context_instance with context_XXXX::instance() in set location (group 13) Sub-task Closed Ankit Agarwal
          14.
          Replace get_context_instance with context_XXXX::instance() in set location (group 14) Sub-task Closed Ankit Agarwal
          15.
          Replace get_context_instance with context_XXXX::instance() in set location (group 15) Sub-task Closed Adrian Greeve
          16.
          Replace get_context_instance with context_XXXX::instance() in set location (group 16) Sub-task Closed Ankit Agarwal
          17.
          Replace get_context_instance with context_XXXX::instance() in set location (Cleanup issue) Sub-task Closed Ankit Agarwal

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: