From: moodler Date: Thu, 31 Aug 2006 04:00:01 +0000 (+0000) Subject: Removed tabs X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=cf0b6604e0625c3a3edb79f6efa410b344759f31;p=moodle.git Removed tabs This block still needs work to merge with the new admin pages --- diff --git a/blocks/admin/block_admin.php b/blocks/admin/block_admin.php index e5ac2246ec..1101cbc800 100644 --- a/blocks/admin/block_admin.php +++ b/blocks/admin/block_admin.php @@ -32,24 +32,24 @@ class block_admin extends block_list { function load_content_for_site() { global $CFG, $USER; - $context = get_context_instance(CONTEXT_SYSTEM, SITEID); + $context = get_context_instance(CONTEXT_SYSTEM, SITEID); if (has_capability('moodle/site:config', $context)) { $this->content->items[] = ''.get_string('configuration').''; $this->content->icons[] = ''; - } - + } + if (has_capability('moodle/site:config', $context)) { $this->content->items[] = ''.get_string('users').''; $this->content->icons[] = ''; } - if (has_capability('moodle/site:backup', $context)) { + if (has_capability('moodle/site:backup', $context)) { $this->content->items[]=''.get_string('backup').''; $this->content->icons[]=''; - } - - if (has_capability('moodle/site:restore', $context)) { + } + + if (has_capability('moodle/site:restore', $context)) { $this->content->items[]=''.get_string('restore').''; $this->content->icons[]=''; } @@ -91,7 +91,7 @@ class block_admin extends block_list { function load_content_for_course() { global $CFG, $USER; - $context = get_context_instance(CONTEXT_COURSE, $this->instance->pageid); + $context = get_context_instance(CONTEXT_COURSE, $this->instance->pageid); require_once($CFG->dirroot.'/mod/forum/lib.php'); @@ -119,25 +119,25 @@ class block_admin extends block_list { $this->content->items[]=''.get_string('settings').''; $this->content->icons[]=''; - } - - $fullname = fullname($USER, has_capability('moodle/site:viewfullnames', $context)); - $editmyprofile = ''.get_string('editmyprofile').''; - if (empty($USER->description)) { - //Accessibility: replace non-standard with CSS ( makes title visible in IE). - $text = get_string('profile').' '.get_string('missingdescription'); - $this->content->items[]= $editmyprofile.' *'.$text.''; - } else { - $this->content->items[]= $editmyprofile; - } - $this->content->icons[]=''; + } + + $fullname = fullname($USER, has_capability('moodle/site:viewfullnames', $context)); + $editmyprofile = ''.get_string('editmyprofile').''; + if (empty($USER->description)) { + //Accessibility: replace non-standard with CSS ( makes title visible in IE). + $text = get_string('profile').' '.get_string('missingdescription'); + $this->content->items[]= $editmyprofile.' *'.$text.''; + } else { + $this->content->items[]= $editmyprofile; + } + $this->content->icons[]=''; /// always need a role assignment link if (has_capability('moodle/role:assign', $context)) { - $this->content->items[]=''.get_string('assignroles', 'role').''; - $this->content->icons[]=''; - } - + $this->content->items[]=''.get_string('assignroles', 'role').''; + $this->content->icons[]=''; + } + if ($course->metacourse) { $strchildcourses = get_string('childcourses'); $this->content->items[]=''.$strchildcourses.''; @@ -149,24 +149,24 @@ class block_admin extends block_list { $this->content->icons[]=''; } - if (has_capability('moodle/site:backup', $context)) { - $this->content->items[]=''.get_string('backup').''; - $this->content->icons[]=''; - } - - if (has_capability('moodle/site:restore', $context)) { - $this->content->items[]=''.get_string('restore').''; - $this->content->icons[]=''; - } - - if (has_capability('moodle/site:import', $context)) { + if (has_capability('moodle/site:backup', $context)) { + $this->content->items[]=''.get_string('backup').''; + $this->content->icons[]=''; + } + + if (has_capability('moodle/site:restore', $context)) { + $this->content->items[]=''.get_string('restore').''; + $this->content->icons[]=''; + } + + if (has_capability('moodle/site:import', $context)) { $this->content->items[]=''.get_string('import').''; $this->content->icons[]=''; } - if (has_capability('moodle/course:reset', $context)) { - $this->content->items[]=''.get_string('reset').''; - $this->content->icons[]=''; + if (has_capability('moodle/course:reset', $context)) { + $this->content->items[]=''.get_string('reset').''; + $this->content->icons[]=''; } if (has_capability('moodle/site:viewreports', $context)) { @@ -179,11 +179,11 @@ class block_admin extends block_list { $this->content->icons[]=''; } - if (has_capability('moodle/course:managescales', $context)) { - $this->content->items[]=''.get_string('scales').''; - $this->content->icons[]=''; - } - + if (has_capability('moodle/course:managescales', $context)) { + $this->content->items[]=''.get_string('scales').''; + $this->content->icons[]=''; + } + $this->content->items[]=''.get_string('grades').''; $this->content->icons[]='';