Skip to content

Commit

Permalink
MDL-76069 enrol_manual: Fix missing breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihail Geshoski committed Oct 27, 2022
1 parent 9d7609f commit 145a069
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions enrol/manual/lang/en/enrol_manual.php
Expand Up @@ -54,6 +54,7 @@
This is a notification that your enrolment in the course \'{$a->course}\' is due to expire on {$a->timeend}.
If you need help, please contact {$a->enroller}.';
$string['managemanualenrolements'] = 'Manage manual enrolments';
$string['manual:config'] = 'Configure manual enrol instances';
$string['manual:enrol'] = 'Enrol users';
$string['manual:manage'] = 'Manage user enrolments';
Expand Down
12 changes: 7 additions & 5 deletions enrol/manual/manage.php
Expand Up @@ -63,13 +63,15 @@
throw new coding_exception('Can not instantiate enrol_manual');
}

$instancename = $enrol_manual->get_instance_name($instance);
$url = new moodle_url('/enrol/manual/manage.php', ['enrolid' => $instance->id]);
$title = get_string('managemanualenrolements', 'enrol_manual');

$PAGE->set_url('/enrol/manual/manage.php', array('enrolid'=>$instance->id));
$PAGE->set_url($url);
$PAGE->set_pagelayout('admin');
$PAGE->set_title($enrol_manual->get_instance_name($instance));
$PAGE->set_title($title);
$PAGE->set_heading($course->fullname);
navigation_node::override_active_url(new moodle_url('/user/index.php', array('id'=>$course->id)));
navigation_node::override_active_url(new moodle_url('/enrol/instances.php', ['id' => $course->id]));
$PAGE->navbar->add($title, $url);

// Create the user selector objects.
$options = array('enrolid' => $enrolid, 'accesscontext' => $context);
Expand Down Expand Up @@ -168,7 +170,7 @@


echo $OUTPUT->header();
echo $OUTPUT->heading($instancename);
echo $OUTPUT->heading($title);

$addenabled = $canenrol ? '' : 'disabled="disabled"';
$removeenabled = $canunenrol ? '' : 'disabled="disabled"';
Expand Down

0 comments on commit 145a069

Please sign in to comment.