MDL-17272 1. Hiding the outcomes menu from admin tree
This commit is contained in:
@@ -148,8 +148,10 @@ if (has_capability('moodle/grade:manage', $systemcontext)
|
||||
|
||||
$scales = new admin_externalpage('scales', get_string('scales'), $CFG->wwwroot.'/grade/edit/scale/index.php', 'moodle/grade:manage');
|
||||
$ADMIN->add('grades', $scales);
|
||||
$outcomes = new admin_externalpage('outcomes', get_string('outcomes', 'grades'), $CFG->wwwroot.'/grade/edit/outcome/index.php', 'moodle/grade:manage');
|
||||
$ADMIN->add('grades', $outcomes);
|
||||
if ($CFG->enableoutcomes) {
|
||||
$outcomes = new admin_externalpage('outcomes', get_string('outcomes', 'grades'), $CFG->wwwroot.'/grade/edit/outcome/index.php', 'moodle/grade:manage');
|
||||
$ADMIN->add('grades', $outcomes);
|
||||
}
|
||||
$letters = new admin_externalpage('letters', get_string('letters', 'grades'), $CFG->wwwroot.'/grade/edit/letter/edit.php', 'moodle/grade:manageletters');
|
||||
$ADMIN->add('grades', $letters);
|
||||
|
||||
|
||||
@@ -46,6 +46,9 @@ if ($courseid) {
|
||||
}
|
||||
|
||||
} else {
|
||||
if (empty($CFG->enableoutcomes)) {
|
||||
redirect('../../../');
|
||||
}
|
||||
require_once $CFG->libdir.'/adminlib.php';
|
||||
admin_externalpage_setup('outcomes');
|
||||
}
|
||||
@@ -103,11 +106,11 @@ switch ($action) {
|
||||
|
||||
if(!$deleteconfirmed){
|
||||
print_header(get_string('outcomedelete', 'grades'));
|
||||
notice_yesno(get_string('outcomeconfirmdelete', 'grades', $outcome->fullname),
|
||||
notice_yesno(get_string('outcomeconfirmdelete', 'grades', $outcome->fullname),
|
||||
"index.php?id={$courseid}", "index.php?id={$courseid}",
|
||||
array('outcomeid' => $outcome->id,
|
||||
'action'=> 'delete',
|
||||
'sesskey' => $USER->sesskey,
|
||||
array('outcomeid' => $outcome->id,
|
||||
'action'=> 'delete',
|
||||
'sesskey' => $USER->sesskey,
|
||||
'deleteconfirmed'=> 1)
|
||||
);
|
||||
print_footer();
|
||||
@@ -180,7 +183,7 @@ if ($courseid and $outcomes = grade_outcome::fetch_all_local($courseid)) {
|
||||
" src=\"$CFG->pixpath/t/delete.gif\" class=\"iconsmall\" alt=\"$strdelete\" /></a> ";
|
||||
}
|
||||
$line[] = $buttons;
|
||||
|
||||
|
||||
$data[] = $line;
|
||||
}
|
||||
$table = new object();
|
||||
@@ -196,7 +199,7 @@ if ($courseid and $outcomes = grade_outcome::fetch_all_local($courseid)) {
|
||||
|
||||
if ($outcomes = grade_outcome::fetch_all_global()) {
|
||||
|
||||
$return = print_heading($strstandardoutcome, '', 2, 'main', true);
|
||||
$return = print_heading($strstandardoutcome, '', 2, 'main', true);
|
||||
$data = array();
|
||||
foreach($outcomes as $outcome) {
|
||||
$line = array();
|
||||
|
||||
Reference in New Issue
Block a user