mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
Merge branch 'MDL-83443-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE
This commit is contained in:
commit
540fda4055
@ -109,7 +109,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"
|
||||
@ -120,4 +120,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"
|
||||
|
@ -99,7 +99,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
|
||||
@ -112,4 +112,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]);
|
||||
@ -3689,7 +3685,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