mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 19:50:14 +01:00
Merge branch 'MDL-83443' of https://github.com/paulholden/moodle
This commit is contained in:
commit
f5c7d78e30
@ -125,7 +125,7 @@ Feature: A course welcome message will be sent to the user when they are enrolle
|
||||
And I should see "Your email address: first@example.com"
|
||||
And I should see "Your first name: First"
|
||||
And I should see "Your last name: User"
|
||||
And I should see "Your course role: student"
|
||||
And I should see "Your course role: Student"
|
||||
# Login as second user and check the notification.
|
||||
When I am on the "C1" "course" page logged in as user2
|
||||
Then I should see "1" in the "#nav-notification-popover-container [data-region='count-container']" "css_element"
|
||||
@ -136,4 +136,4 @@ Feature: A course welcome message will be sent to the user when they are enrolle
|
||||
And I should see "Your email address: second@example.com"
|
||||
And I should see "Your first name: Second"
|
||||
And I should see "Your last name: User"
|
||||
And I should see "Your course role: student"
|
||||
And I should see "Your course role: Student"
|
||||
|
@ -110,7 +110,7 @@ Feature: A course welcome message will be sent to the user when they auto-enrol
|
||||
And I should see "Your email address: first@example.com"
|
||||
And I should see "Your first name: First"
|
||||
And I should see "Your last name: User"
|
||||
And I should see "Your course role: student"
|
||||
And I should see "Your course role: Student"
|
||||
# Login as second user and check the notification.
|
||||
And I log in as "user2"
|
||||
And I am on "Course 1" course homepage
|
||||
@ -123,4 +123,4 @@ Feature: A course welcome message will be sent to the user when they auto-enrol
|
||||
And I should see "Your email address: second@example.com"
|
||||
And I should see "Your first name: Second"
|
||||
And I should see "Your last name: User"
|
||||
And I should see "Your course role: student"
|
||||
And I should see "Your course role: Student"
|
||||
|
@ -3655,11 +3655,7 @@ abstract class enrol_plugin {
|
||||
$context = context_course::instance($instance->courseid);
|
||||
$user = core_user::get_user($userid);
|
||||
$course = get_course($instance->courseid);
|
||||
$courserole = $DB->get_field(
|
||||
table: 'role',
|
||||
return: 'shortname',
|
||||
conditions: ['id' => $instance->roleid],
|
||||
);
|
||||
$courserole = $DB->get_record('role', ['id' => $instance->roleid]);
|
||||
|
||||
$a = new stdClass();
|
||||
$a->coursename = format_string($course->fullname, true, ['context' => $context, 'escape' => false]);
|
||||
@ -3693,7 +3689,7 @@ abstract class enrol_plugin {
|
||||
$user->email,
|
||||
$user->firstname,
|
||||
$user->lastname,
|
||||
$courserole,
|
||||
role_get_name($courserole, $context),
|
||||
];
|
||||
$message = str_replace($placeholders, $values, $message);
|
||||
if (strpos($message, '<') === false) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user