MDL-14402 blocks: Do not show assign roles on my home

This commit is contained in:
Andrew Nicols 2014-11-19 10:22:02 +08:00
parent ca0e301c7b
commit 29ac5a6bce
2 changed files with 25 additions and 1 deletions

View file

@ -1082,7 +1082,7 @@ class block_manager {
}
// Assign roles icon.
if (has_capability('moodle/role:assign', $block->context)) {
if ($this->page->pagetype != 'my-index' && has_capability('moodle/role:assign', $block->context)) {
//TODO: please note it is sloppy to pass urls through page parameters!!
// it is shortened because some web servers (e.g. IIS by default) give
// a 'security' error if you try to pass a full URL as a GET parameter in another URL.