mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
MDL-73645 grades: Update breadcrumb nodes
This commit is contained in:
parent
1060ee827c
commit
724578a008
10 changed files with 46 additions and 18 deletions
|
@ -33,7 +33,8 @@ $id = optional_param('id', 0, PARAM_INT);
|
|||
$delete = optional_param('delete', 0, PARAM_BOOL);
|
||||
$confirm = optional_param('confirm', 0, PARAM_BOOL);
|
||||
|
||||
$PAGE->set_url('/grade/import/key.php', array('courseid' => $courseid, 'id' => $id));
|
||||
$url = new moodle_url('/grade/import/key.php', ['courseid' => $courseid, 'id' => $id]);
|
||||
$PAGE->set_url($url);
|
||||
|
||||
if ($id) {
|
||||
if (!$key = $DB->get_record('user_private_key', array('id' => $id))) {
|
||||
|
@ -76,11 +77,18 @@ if (!empty($key->userid) and $USER->id != $key->userid) {
|
|||
|
||||
$returnurl = $CFG->wwwroot.'/grade/import/keymanager.php?id='.$course->id;
|
||||
|
||||
$strkeys = get_string('keymanager', 'userkey');
|
||||
$strimportgrades = get_string('import', 'grades');
|
||||
$PAGE->navbar->add($strimportgrades, new moodle_url(new moodle_url('/grade/import/index.php', ['id' => $courseid])));
|
||||
$PAGE->navbar->add($strkeys, new moodle_url('/grade/import/keymanager.php', ['id' => $courseid]));
|
||||
|
||||
if ($id and $delete) {
|
||||
if (!$confirm) {
|
||||
$PAGE->set_title(get_string('deleteselectedkey'));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->set_secondary_active_tab('grades');
|
||||
$PAGE->navbar->add(get_string('deleteuserkey', 'userkey'));
|
||||
|
||||
echo $OUTPUT->header();
|
||||
$optionsyes = array('id'=>$id, 'delete'=>1, 'courseid'=>$courseid, 'sesskey'=>sesskey(), 'confirm'=>1);
|
||||
$optionsno = array('id'=>$courseid);
|
||||
|
@ -118,17 +126,12 @@ if ($editform->is_cancelled()) {
|
|||
redirect($returnurl);
|
||||
}
|
||||
|
||||
$strkeys = get_string('userkeys', 'userkey');
|
||||
$strgrades = get_string('grades');
|
||||
|
||||
if ($id) {
|
||||
$strheading = get_string('edituserkey', 'userkey');
|
||||
} else {
|
||||
$strheading = get_string('createuserkey', 'userkey');
|
||||
}
|
||||
|
||||
$PAGE->navbar->add($strgrades, new moodle_url('/grade/index.php', array('id'=>$courseid)));
|
||||
$PAGE->navbar->add($strkeys, new moodle_url('/grade/import/keymanager.php', array('id'=>$courseid)));
|
||||
$PAGE->navbar->add($strheading);
|
||||
|
||||
/// Print header
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue