Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.9, 2.7.2
-
Component/s: Blocks, Dashboard (My home)
-
Testing Instructions:
- Run Behat
-
Affected Branches:MOODLE_19_STABLE, MOODLE_27_STABLE
-
Fixed Branches:MOODLE_27_STABLE, MOODLE_28_STABLE
-
Pull from Repository:
-
Pull Master Branch:
MDL-14402-master -
Pull Master Diff URL:
-
Sprint:FRONTEND Sprint 15
Description
The block code currently shows the roles button for all non-pinned blocks, including those on the myMoodle page. But on myMoodle, you can't give any-one else permission to see the page or block instance, so I think roles are redundant. The icon is likely to confuse students who wouldn't normally see it.
I think the fix is in blocks/moodleblock.class.php
$onmymoodle = strpos( $_SERVER['PHP_SELF'], '/my/index.php' ) !== false ? true : false;
if( !$onmymoodle & empty($this->instance->pinned)) {
instead of just if( empty($this->instance->pinned)) {
Unless you can find a more elegant solution?
Attachments
Issue Links
- caused a regression
-
MDL-51702 Cannot assign roles to blocks in indexsys.php (default Dashboard or My page)
-
- Closed
-
- has a non-specific relationship to
-
MDL-48322 Missing capability check when adding assign roles link to block administration
-
- Closed
-
- Testing discovered
-
MDL-48380 Remove Assign Roles button from blocks when no roles can be assigned
-
- Closed
-