mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-12703 - Use the 'welcometocourse' language string if there is no 'welcomemessage' property set in the course object. Currently, there does not seem to be any code or data items that would set this property.
This commit is contained in:
parent
ca29e37d24
commit
19c8cf7917
1 changed files with 9 additions and 4 deletions
|
@ -4283,12 +4283,17 @@ function email_welcome_message_to_user($course, $user=NULL) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($course->welcomemessage)) {
|
if (!empty($course->welcomemessage)) {
|
||||||
$subject = get_string('welcometocourse', '', format_string($course->fullname));
|
$message = $course->welcomemessage;
|
||||||
|
} else {
|
||||||
|
$a = new Object();
|
||||||
$a->coursename = $course->fullname;
|
$a->coursename = $course->fullname;
|
||||||
$a->profileurl = "$CFG->wwwroot/user/view.php?id=$USER->id&course=$course->id";
|
$a->profileurl = "$CFG->wwwroot/user/view.php?id=$USER->id&course=$course->id";
|
||||||
//$message = get_string("welcometocoursetext", "", $a);
|
$message = get_string("welcometocoursetext", "", $a);
|
||||||
$message = $course->welcomemessage;
|
}
|
||||||
|
|
||||||
|
/// If you don't want a welcome message sent, then make the message string blank.
|
||||||
|
if (!empty($message)) {
|
||||||
|
$subject = get_string('welcometocourse', '', format_string($course->fullname));
|
||||||
|
|
||||||
if (! $teacher = get_teacher($course->id)) {
|
if (! $teacher = get_teacher($course->id)) {
|
||||||
$teacher = get_admin();
|
$teacher = get_admin();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue