芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/.trash/cepali/admin/roles/classes/define_role_table_basic.php
. /** * Library code used by the roles administration interfaces. * * @package core_role * @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); class core_role_define_role_table_basic extends core_role_define_role_table_advanced { protected $stradvmessage; protected $strallow; public function __construct($context, $roleid) { parent::__construct($context, $roleid); $this->displaypermissions = array(CAP_ALLOW => $this->allpermissions[CAP_ALLOW]); $this->stradvmessage = get_string('useshowadvancedtochange', 'core_role'); $this->strallow = $this->strperms[$this->allpermissions[CAP_ALLOW]]; } protected function print_show_hide_advanced_button() { echo '
'; echo '
'; echo '
'; } protected function add_permission_cells($capability) { $perm = $this->permissions[$capability->name]; $permname = $this->allpermissions[$perm]; $defaultperm = $this->allpermissions[$this->parentpermissions[$capability->name]]; $content = '
'; if ($perm == CAP_ALLOW || $perm == CAP_INHERIT) { $checked = ''; if ($perm == CAP_ALLOW) { $checked = 'checked="checked" '; } $content .= '
'; $content .= '
' . $this->strallow . '
'; } else { $content .= '
'; $content .= $this->strperms[$permname] . '
' . $this->stradvmessage . '
'; } $content .= '
'; return $content; } }