Moodle
  1. Moodle
  2. MDL-14460

Fix all ocurrences of get_context_instance(CONTEXT_SYSTEM, SITEID)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.1
    • Component/s: Libraries, Roles / Access
    • Labels:
      None
    • Database:
      Any
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      31007

      Description

      In Moodle code there are a lot of calls of this type:

      get_context_instance(CONTEXT_SYSTEM, SITEID)

      And, when requesting for CONTEXT_SYSTEM we don't need to specify SITEID any more.

      So, all the sentences above should be changed to:

      get_context_instance(CONTEXT_SYSTEM)

      There are aprox. 130 changes to perform, distributed along aprox. 90 files. I would suggest to do the change progressively, fixing 3-4 files each day, both in 19_STABLE and HEAD.

      Ciao

        Activity

        Hide
        Dongsheng Cai added a comment -

        OK, I will fix it "gradually" this time

        Show
        Dongsheng Cai added a comment - OK, I will fix it "gradually" this time
        Hide
        Dongsheng Cai added a comment -

        Fixed in moodle 1.9 and merged into head, feel free to reopen if you find problems.

        Show
        Dongsheng Cai added a comment - Fixed in moodle 1.9 and merged into head, feel free to reopen if you find problems.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Verified. Closing. Peerfect!

        Show
        Eloy Lafuente (stronk7) added a comment - Verified. Closing. Peerfect!

          People

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

            Dates

            • Created:
              Updated:
              Resolved: