MDL-44505 mod_forum: Make mailing subject a configurable language string

This commit is contained in:
Henning Bostelmann 2014-03-07 16:06:55 +00:00
parent c0e88129d1
commit 013e85bbcc
2 changed files with 6 additions and 1 deletions

View File

@ -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'] = '<p>This post will be mailed out immediately to all forum subscribers.</p>';
$string['postmailsubject'] = '{$a->courseshortname}: {$a->subject}';
$string['postrating1'] = 'Mostly separate knowing';
$string['postrating2'] = 'Separate and connected';
$string['postrating3'] = 'Mostly connected knowing';

View File

@ -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);