The Permissions option?

The Permissions option?

by Syed HameedUllah -
Number of replies: 1

Dear Folks,

Please let me know about the permissions option in the block configuration menu or block action menu.

I know the functionality of that link but it does not appear on any of the page types I was looking for it on the frontpage and on dashboard also but with no hope.

Is it removed in the 3.3+ versions?

I have used it in Moodle 2.9+ versions but unable to find it now on the latest version of Moodle, I am using the child theme of clean.

Thanks in advance.

Hameed

Average of ratings: -
In reply to Syed HameedUllah

Re: The Permissions option?

by Syed HameedUllah -

I have been through the file /lib/blocklib.php

The condition for the Permission link to appear in the menu was this:

if (get_assignable_roles($block->context, ROLENAME_SHORT)) {
            $rolesurl = new moodle_url('/admin/roles/assign.php', array('contextid' => $block->context->id));
            $str = new lang_string('assignrolesinblock', 'block', $blocktitle);
            $icon = 'i/assignroles';
        } else if (has_capability('moodle/role:review', $block->context) or get_overridable_roles($block->context)) {
            $rolesurl = new moodle_url('/admin/roles/permissions.php', array('contextid' => $block->context->id));
            $str = get_string('permissions', 'role');
            $icon = 'i/permissions';
        } else if (has_any_capability(array('moodle/role:safeoverride', 'moodle/role:override', 'moodle/role:assign'), $block->context)) {
            $rolesurl = new moodle_url('/admin/roles/check.php', array('contextid' => $block->context->id));
            $str = get_string('checkpermissions', 'role');
            $icon = 'i/checkpermissions';
        }


can anyone please help me with the functionality of 

get_overridable_roles($block->context))

FYI: I have cloned couple of roles with archtype teacher and manager.

Thanks

Hameed