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

'Page context not set' debug output when editing outcomes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.2, 3.0.6, 3.1.2
    • Fix Version/s: 3.0.7, 3.1.3
    • Component/s: Gradebook
    • Labels:
    • Testing Instructions:
      Hide
      1. Login as admin
      2. Turn debugging on.
      3. Enable outcomes
      4. Create a course
      5. Under course administration, click Outcomes
      6. Click the Edit outcomes link
      7. Click Add a new outcome
      8. Enter values for Full name, Short name and Scale.
      9. Tick Standard outcome
      10. Click Save changes
      11. Back on the Outcomes page, click on the Edit icon for the created standard outcome.
        • Confirm that there is no error message displayed.
      12. Create a custom outcome (Standard outcome checkbox not ticked).
      13. Edit the custom outcome.
        • Confirm that there is no error message displayed.
      Show
      Login as admin Turn debugging on. Enable outcomes Create a course Under course administration, click Outcomes Click the Edit outcomes link Click Add a new outcome Enter values for Full name, Short name and Scale. Tick Standard outcome Click Save changes Back on the Outcomes page, click on the Edit icon for the created standard outcome. Confirm that there is no error message displayed. Create a custom outcome (Standard outcome checkbox not ticked). Edit the custom outcome. Confirm that there is no error message displayed.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-36611-master

      Description

      When editing an outcome from a course, the following debug output is displayed.

      To reproduce:

      1. Login as admin
      2. Turn debugging on.
      3. Enable outcomes
      4. Create a course
      5. Under course administration, click Outcomes
      6. Click the Edit outcomes link
      7. Click Add a new outcome
      8. Enter values for Full name, Short name and Scale.
      9. Tick Standard outcome
      10. Click Save changes
      11. Back on the Outcomes page, click on the Edit icon for the created standard outcome.
      12. Expected:
        • No error message displayed.
      13. Actual:
        • The following error is displayed

          Coding problem: $PAGE->context was not set. You may have forgotten to call require_login() or $PAGE->set_context(). The page may not display correctly as a result
          line 458 of /lib/pagelib.php: call to debugging()
          line 1531 of /lib/pagelib.php: call to moodle_page->magic_get_context()
          line 1823 of /lib/setuplib.php: call to moodle_page->initialise_theme_and_output()
          line 1482 of /lib/formslib.php: call to bootstrap_renderer->__call()
          line 196 of /lib/formslib.php: call to MoodleQuickForm->__construct()
          line 121 of /grade/edit/outcome/edit.php: call to moodleform->__construct()

      Example URL
      http://

      {moodleurl}

      /grade/edit/outcome/edit.php?courseid=2&id=1

      Will suggest a fix shortly.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              badblock Kirill Astashov
              Peer reviewer:
              Jun Pataleta
              Integrator:
              Dan Poltawski
              Tester:
              Ryan Wyllie
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Nov/16