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

create_context() problems when parent context does not exist yet

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Component/s: Roles / Access
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      I have noticed this bug during restore - the questions code uses get_context_instance(CONTEXT_MODULE, xx) before context for course exists.
      Looking at the code of create_context() it should IMO recurse if parent context does not exist and fail properly if parent can not be created.

      testing a patch...

        Attachments

          Activity

            People

            Assignee:
            martinlanghoff Martín Langhoff
            Reporter:
            skodak Petr Skoda
            Tester:
            Nobody
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              3/Mar/08