: name)); ?>
: shortname); ?>
: description, FORMAT_HTML)); $usehtmleditor = false; ?>
: legacytype)) { print_string('none'); } else { print_string('legacy:'.$role->legacytype, 'role'); } ?>
name).'" />'; if (isset($errors["name"])) formerr($errors["name"]); ?>
shortname).'" />'; if (isset($errors["shortname"])) formerr($errors["shortname"]); ?>
description); ?>
$lcap) { $options[$ltype] = get_string('legacy:'.$ltype, 'role'); } choose_from_menu($options, 'legacytype', $role->legacytype, ''); ?>
legacytype)) { $defaultcaps = get_default_capabilities($role->legacytype); } else { $defaultcaps = false; } foreach ($capabilities as $capability) { //legacy caps have their own selector if (islegacy($capability->name)) { continue; } // prints a breaker if component or name or context level if (component_level_changed($capability, $component, $contextlevel)) { //if ($capability->component != $component or $capability->contextlevel != $contextlevel) { echo (''); } // these 2 are used to see to group same mod/core capabilities together $contextlevel = $capability->contextlevel; $component = $capability->component; if (empty($errors)) { // check the capability override for this cap, this role in this context $localoverride = get_local_override($roleid, $sitecontext->id, $capability->name); } else { $localoverride = new object(); $localoverride->permission = $role->{$capability->name}; } $disabled = ($action != 'edit' and $action != 'add') ? ' disabled="disabled" ' : ''; $riskinfo = ''; $isinherit = (!isset($defaultcaps[$capability->name]) or $defaultcaps[$capability->name] == CAP_INHERIT) ? 'capdefault' : ''; $isallow = (isset($defaultcaps[$capability->name]) and $defaultcaps[$capability->name] == CAP_ALLOW) ? 'capdefault' : ''; $isprevent = (isset($defaultcaps[$capability->name]) and $defaultcaps[$capability->name] == CAP_PREVENT) ? 'capdefault' : ''; $isprohibit = (isset($defaultcaps[$capability->name]) and $defaultcaps[$capability->name] == CAP_PROHIBIT) ? 'capdefault' : ''; ?>
'. get_component_string($capability->component, $capability->contextlevel).'
'; $rowclasses = ''; if (RISK_MANAGETRUST & (int)$capability->riskbitmask) { $riskinfo .= ''; $riskinfo .= ''.get_string('riskmanagetrustshort', 'admin').''; $rowclasses .= ' riskmanagetrust'; } $riskinfo .= ''; if (RISK_CONFIG & (int)$capability->riskbitmask) { $riskinfo .= ''; $riskinfo .= ''.get_string('riskconfigshort', 'admin').''; $rowclasses .= ' riskconfig'; } $riskinfo .= ''; if (RISK_XSS & (int)$capability->riskbitmask) { $riskinfo .= ''; $riskinfo .= ''.get_string('riskxssshort', 'admin').''; $rowclasses .= ' riskxss'; } $riskinfo .= ''; if (RISK_PERSONAL & (int)$capability->riskbitmask) { $riskinfo .= ''; $riskinfo .= ''.get_string('riskpersonalshort', 'admin').''; $rowclasses .= ' riskpersonal'; } $riskinfo .= ''; if (RISK_SPAM & (int)$capability->riskbitmask) { $riskinfo .= ''; $riskinfo .= ''.get_string('riskspamshort', 'admin').''; $rowclasses .= ' riskspam'; } $riskinfo .= '
name); ?>name ?> permission) || $localoverride->permission==CAP_INHERIT){ echo 'checked="checked"'; }?> /> permission) && $localoverride->permission==CAP_ALLOW){ echo 'checked="checked"'; }?> /> permission) && $localoverride->permission==CAP_PREVENT){ echo 'checked="checked"'; }?> /> permission) && $localoverride->permission==CAP_PROHIBIT){ echo 'checked="checked"'; }?> />