new metacourse fixes for admin block

This commit is contained in:
skodak
2006-09-18 09:58:22 +00:00
parent 339dc4e28f
commit a7a54c3ba1
+9 -1
View File
@@ -61,10 +61,18 @@ class block_admin extends block_list {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/admin/roles/assign.php?contextid='.$context->id.'">'.get_string('assignroles', 'role').'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/roles.gif" alt="" />';
if ($course->metacourse) {
}
/// Manage metacourses
if ($course->metacourse) {
if (has_capability('moodle/course:managemetacourses', $context)) {
$strchildcourses = get_string('childcourses');
$this->content->items[]='<a href="importstudents.php?id='.$this->instance->pageid.'">'.$strchildcourses.'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/course.gif" alt="" />';
} else if (has_capability('moodle/role:assign', $context)) {
$strchildcourses = get_string('childcourses');
$this->content->items[]='<span class="dimmed_text">'.$strchildcourses.'</span>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/course.gif" alt="" />';
}
}