Affects Version/s: 2.6.4, 2.7, 2.7.3, 2.8.1
- Log in as admin
- Create a new role that can be assigned to block contexts
- Go to the front page and, turn editing on
- Navigate to a category (course/index.php?category=ID)
- Add a block to the category page
- Back on the category page, click the gear in the new block and choose Assign roles in NAME OF BLOCK
- Confirm that you do not get a fatal error
- Confirm that you can assign a role in that context
Test 1 Log in as admin Create a new role that can be assigned to block contexts Go to the front page and, turn editing on Navigate to a category (course/index.php?category=ID) Add a block to the category page Back on the category page, click the gear in the new block and choose Assign roles in NAME OF BLOCK Confirm that you do not get a fatal error Confirm that you can assign a role in that context Test 2 Check the Behat results on CI, this should not have caused any regression
- Check the Behat results on CI, this should not have caused any regression
Affected Branches:MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
Fixed Branches:MOODLE_27_STABLE, MOODLE_28_STABLE
Pull from Repository:
Pull Master Branch:
Pull Master Diff URL:
Sprint:BACKEND Sprint 18
See testing instructions for reproduction steps.
I am trying to configure a number of blocks in a category so that they will appear in all pages under that category, however none of these blocks appear.
If you then try to assign permissions to any of the blocks I get a Coding error detected.
'Default exception handler: Coding error detected, it must be fixed by a programmer: PHP catchable fatal error Debug: Argument 2 passed to has_any_capability() must be an instance of context, boolean given, called in [dir root]/course/lib.php on line 1424 and defined\nError code: codingerror\n* line 393 of /lib/setuplib. php: coding_exception thrown\n* line 514 of /lib/accesslib.php:'
I am also trying this with a fresh XAMPP 2.7.1 installation package and see the same errors.
All of this is done while logged on as the admin user, the procedure I am using is thus;
Turn editing on;
Go to Site administration;
Select Manage Courses and categories
Add a block
HTML or calendar or any type of block
Configure the block
Where this block appears and On this page
Select Display on Category: category name and any pages within it
change the default region and weight if required
Go to any of the courses beneath the category and view.
I would now expect to see the blocks appearing on all of the course pages under this category in the region and position selected however the block or blocks added do not display.
This is working on our current live 2.3 system, however we are trying to upgrade to 2.7