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

Fix $PAGE->context issues with validate_context()

    XMLWordPrintable

    Details

      Description

      require_login() sets $PAGE->context and was only ever designed for one request, one page style php code. External functions have to hook into this to set the correct context for filters, theme, language etc, but its harder because external functions may deal with multiple contexts and multiple external functions may be called from a single page. Also external functions should be callable from regular code, but currently this is all buggy and broken. We recently changed from debugging to exceptions when the page context is not set correctly. This breaks all correctly coded webservices that work on a context outside of a course.

      Fix this mess.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  23/May/16