MDL-50666 core: Add function get_viewable_roles to set role visibility

This commit is contained in:
Andrew Hancox
2017-12-19 13:53:23 +13:00
committed by Jun Pataleta
parent 95b7be7f05
commit a63cd3e2ca
32 changed files with 685 additions and 37 deletions
+1 -1
View File
@@ -266,7 +266,7 @@ function xmldb_main_install() {
// Default allow role matrices.
foreach ($DB->get_records('role') as $role) {
foreach (array('assign', 'override', 'switch') as $type) {
foreach (array('assign', 'override', 'switch', 'view') as $type) {
$function = 'allow_'.$type;
$allows = get_default_role_archetype_allows($type, $role->archetype);
foreach ($allows as $allowid) {