Removed some old calls to isadmin

This commit is contained in:
moodler
2006-08-13 13:12:51 +00:00
parent 7fad699525
commit 624f2fea76
2 changed files with 5 additions and 6 deletions
+2 -3
View File
@@ -339,9 +339,8 @@
$context = get_context_instance(CONTEXT_SYSTEM, SITEID);
if (!isadmin()) {
//if (!has_capability('moodle/site:config', $context->id)) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
if (!has_capability('moodle/site:config', $context->id)) {
print_error("permissionconfig", '', "$CFG->wwwroot/login/index.php");
}
/// Check if we are returning from moodle.org registration and if so, we mark that fact to remove reminders
+3 -3
View File
@@ -39,7 +39,7 @@ class block_admin extends block_list {
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/admin.gif" alt="" />';
}
if (isadmin()) {
if (has_capability('moodle/site:config', $context->id)) {
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/users.php">'.get_string('users').'</a>';
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/users.gif" alt="" />';
}
@@ -54,12 +54,12 @@ class block_admin extends block_list {
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/restore.gif" alt="" />';
}
if (iscreator()) {
if (has_capability('moodle/course:create', $context->id)) {
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/course/index.php?edit=on&amp;sesskey='.sesskey().'">'.get_string('courses').'</a>';
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/course.gif" alt="" />';
}
if (isadmin()) {
if (has_capability('moodle/site:config', $context->id)) {
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/course/report/log/index.php?id='.SITEID.'">'.get_string('logs').'</a>';
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/log.gif" alt="" />';