mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Reordered the list a bit
This commit is contained in:
parent
bb3f9f08dd
commit
60e2592702
1 changed files with 22 additions and 20 deletions
|
@ -61,7 +61,6 @@ class block_admin extends block_list {
|
||||||
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/settings.gif" class="icon" alt="" />';
|
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/settings.gif" class="icon" alt="" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Assign roles to the course
|
/// Assign roles to the course
|
||||||
|
|
||||||
if (has_capability('moodle/role:assign', $context) && ($course->id!==SITEID)) {
|
if (has_capability('moodle/role:assign', $context) && ($course->id!==SITEID)) {
|
||||||
|
@ -70,6 +69,26 @@ class block_admin extends block_list {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// View course grades (or just your own grades, same link)
|
||||||
|
if ((has_capability('moodle/grade:viewall', $context) or
|
||||||
|
(has_capability('moodle/grade:view', $context) && $course->showgrades)) && ($course->id!==SITEID)) {
|
||||||
|
$this->content->items[]='<a href="'.$CFG->wwwroot.'/grade/report/index.php?id='.$this->instance->pageid.'">'.get_string('grades').'</a>';
|
||||||
|
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/grades.gif" class="icon" alt="" />';
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Course outcomes
|
||||||
|
if (has_capability('moodle/course:update', $context) && ($course->id!==SITEID)) {
|
||||||
|
$this->content->items[]='<a href="'.$CFG->wwwroot.'/grade/edit/outcome/course.php?id='.$this->instance->pageid.'">'.get_string('outcomes', 'grades').'</a>';
|
||||||
|
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/grades.gif" class="icon" alt="" />'; //TODO: add outcomes icon
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Manage scales
|
||||||
|
if (has_capability('moodle/course:managescales', $context) && ($course->id!==SITEID)) {
|
||||||
|
$this->content->items[]='<a href="'.$CFG->wwwroot.'/grade/edit/scale/index.php?id='.$this->instance->pageid.'">'.get_string('scales').'</a>';
|
||||||
|
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/scales.gif" class="icon" alt="" />';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Manage metacourses
|
/// Manage metacourses
|
||||||
if ($course->metacourse) {
|
if ($course->metacourse) {
|
||||||
if (has_capability('moodle/course:managemetacourse', $context)) {
|
if (has_capability('moodle/course:managemetacourse', $context)) {
|
||||||
|
@ -129,12 +148,6 @@ class block_admin extends block_list {
|
||||||
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/questions.gif" class="icon" alt="" />';
|
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/questions.gif" class="icon" alt="" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Manage scales
|
|
||||||
if (has_capability('moodle/course:managescales', $context) && ($course->id!==SITEID)) {
|
|
||||||
$this->content->items[]='<a href="'.$CFG->wwwroot.'/grade/edit/scale/index.php?id='.$this->instance->pageid.'">'.get_string('scales').'</a>';
|
|
||||||
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/scales.gif" class="icon" alt="" />';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// Manage files
|
/// Manage files
|
||||||
if (has_capability('moodle/course:managefiles', $context) && ($course->id!==SITEID)) {
|
if (has_capability('moodle/course:managefiles', $context) && ($course->id!==SITEID)) {
|
||||||
|
@ -155,19 +168,7 @@ class block_admin extends block_list {
|
||||||
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/payment.gif" class="icon" alt="" />';
|
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/payment.gif" class="icon" alt="" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Used outcomes
|
/// Unenrol link
|
||||||
if (has_capability('moodle/course:update', $context) && ($course->id!==SITEID)) {
|
|
||||||
$this->content->items[]='<a href="'.$CFG->wwwroot.'/grade/edit/outcome/course.php?id='.$this->instance->pageid.'">'.get_string('outcomes', 'grades').'</a>';
|
|
||||||
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/grades.gif" class="icon" alt="" />'; //TODO: add outcomes icon
|
|
||||||
}
|
|
||||||
|
|
||||||
/// View course grades (or just your own grades, same link)
|
|
||||||
if ((has_capability('moodle/grade:viewall', $context) or
|
|
||||||
(has_capability('moodle/grade:view', $context) && $course->showgrades)) && ($course->id!==SITEID)) {
|
|
||||||
$this->content->items[]='<a href="'.$CFG->wwwroot.'/grade/report/index.php?id='.$this->instance->pageid.'">'.get_string('grades').'</a>';
|
|
||||||
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/grades.gif" class="icon" alt="" />';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($course->metacourse) && ($course->id!==SITEID)) {
|
if (empty($course->metacourse) && ($course->id!==SITEID)) {
|
||||||
if (has_capability('moodle/legacy:guest', $context, NULL, false)) { // Are a guest now
|
if (has_capability('moodle/legacy:guest', $context, NULL, false)) { // Are a guest now
|
||||||
$this->content->items[]='<a href="enrol.php?id='.$this->instance->pageid.'">'.get_string('enrolme', '', format_string($course->shortname)).'</a>';
|
$this->content->items[]='<a href="enrol.php?id='.$this->instance->pageid.'">'.get_string('enrolme', '', format_string($course->shortname)).'</a>';
|
||||||
|
@ -178,6 +179,7 @@ class block_admin extends block_list {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Should the following two be in this block?
|
/// Should the following two be in this block?
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue