diff --git a/enrol/self/tests/behat/self_enrolment.feature b/enrol/self/tests/behat/self_enrolment.feature index 2599bcca4d9..aa465245f46 100644 --- a/enrol/self/tests/behat/self_enrolment.feature +++ b/enrol/self/tests/behat/self_enrolment.feature @@ -137,7 +137,7 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe And I press "Enrol me" And I should see "You are enrolled in the course" And I am on the "C1" "course" page - And I navigate to "Unenrol me from C1" in current page administration + And I navigate to "Unenrol me from this course" in current page administration And I click on "Continue" "button" in the "Confirm" "dialogue" Then I should see "You are unenrolled from the course \"Course 1\"" diff --git a/lang/en/enrol.php b/lang/en/enrol.php index 3c3de09a16b..3d2b5854dfd 100644 --- a/lang/en/enrol.php +++ b/lang/en/enrol.php @@ -144,7 +144,7 @@ $string['unassignnotpermitted'] = 'You do not have permission to unassign roles $string['unenrol'] = 'Unenrol'; $string['unenrolleduser'] = 'The user "{$a->fullname}" was unenrolled from the course'; $string['unenrolconfirm'] = 'Do you really want to unenrol "{$a->user}" (previously enrolled via "{$a->enrolinstancename}") from "{$a->course}"?'; -$string['unenrolme'] = 'Unenrol me from {$a}'; +$string['unenrolme'] = 'Unenrol me from this course'; $string['unenrolnotpermitted'] = 'You do not have permission to unenrol this user from the course.'; $string['unenrolroleusers'] = 'Unenrol users'; $string['uninstallmigrating'] = 'Migrating "{$a}" enrolments'; diff --git a/lib/enrollib.php b/lib/enrollib.php index 8579c842cd1..186ade3abda 100644 --- a/lib/enrollib.php +++ b/lib/enrollib.php @@ -530,8 +530,8 @@ function enrol_add_course_navigation(navigation_node $coursenode, $course) { } $plugin = $plugins[$instance->enrol]; if ($unenrollink = $plugin->get_unenrolself_link($instance)) { - $shortname = format_string($course->shortname, true, array('context' => $coursecontext)); - $coursenode->add(get_string('unenrolme', 'core_enrol', $shortname), $unenrollink, navigation_node::TYPE_SETTING, null, 'unenrolself', new pix_icon('i/user', '')); + $coursenode->add(get_string('unenrolme', 'core_enrol'), $unenrollink, + navigation_node::TYPE_SETTING, null, 'unenrolself', new pix_icon('i/user', '')); $coursenode->get('unenrolself')->set_force_into_more_menu(true); break; //TODO. deal with multiple unenrol links - not likely case, but still...