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

Course category permission error when adding a role

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      1. Navigate to Site administration ► Courses ► Manage courses and categories
      2. Click on the a category.
      3. In the Settings block, click on Permissions.
      4. Find a capability (e.g. type that name in the "Filter" textbox).
      5. In the "Roles with permission" column, click on the plus icon.

      Show
      1. Navigate to Site administration ► Courses ► Manage courses and categories 2. Click on the a category. 3. In the Settings block, click on Permissions. 4. Find a capability (e.g. type that name in the "Filter" textbox). 5. In the "Roles with permission" column, click on the plus icon.
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      mdl55456-master

      Description

      I'm getting a weird error when I try to add a role to a category permission capability.

      If you go to a course, create a category and then permissions, try to add teacher role to one of the capabilities and I got the following error:

      Coding error detected, it must be fixed by a programmer: $PAGE->context was not set. You may have forgotten to call require_login() or $PAGE->set_context()
       
      * line 453 of /lib/pagelib.php: coding_exception thrown
      * line 1531 of /lib/pagelib.php: call to moodle_page->magic_get_context()
      * line 1822 of /lib/setuplib.php: call to moodle_page->initialise_theme_and_output()
      * line 39 of /admin/roles/ajax.php: call to bootstrap_renderer->__call()
      

      The error is displayed inside the Allow role pop up buttons, see screenshot.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

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