diff --git a/mod/forum/lang/en/forum.php b/mod/forum/lang/en/forum.php index 7c775c8d549..fac1454151b 100644 --- a/mod/forum/lang/en/forum.php +++ b/mod/forum/lang/en/forum.php @@ -360,6 +360,7 @@ $string['postmailinfo'] = 'This is a copy of a message posted on the {$a} websit To reply click on this link:'; $string['postmailnow'] = '

This post will be mailed out immediately to all forum subscribers.

'; +$string['postmailsubject'] = '{$a->courseshortname}: {$a->subject}'; $string['postrating1'] = 'Mostly separate knowing'; $string['postrating2'] = 'Separate and connected'; $string['postrating3'] = 'Mostly connected knowing'; diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 37bae10900c..49dee5950ef 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -731,7 +731,11 @@ function forum_cron() { $shortname = format_string($course->shortname, true, array('context' => context_course::instance($course->id))); - $postsubject = html_to_text("$shortname: ".format_string($post->subject, true)); + $a = new stdClass(); + $a->courseshortname = $shortname; + $a->forumname = $cleanforumname; + $a->subject = format_string($post->subject, true); + $postsubject = html_to_text(get_string('postmailsubject', 'forum', $a)); $posttext = forum_make_mail_text($course, $cm, $forum, $discussion, $post, $userfrom, $userto); $posthtml = forum_make_mail_html($course, $cm, $forum, $discussion, $post, $userfrom, $userto);