Skip to content

Commit

Permalink
MDL-48227 forum: Update the message shown in emails
Browse files Browse the repository at this point in the history
AMOS BEGIN
 CPY [deleteoriginalonreply,mod_forum],[replytopostbyemail,mod_forum]
AMOS END
  • Loading branch information
ankitagarwal committed Nov 28, 2014
1 parent 296b602 commit d141109
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
1 change: 1 addition & 0 deletions mod/forum/lang/en/forum.php
Expand Up @@ -409,6 +409,7 @@
$string['reply'] = 'Reply';
$string['replyforum'] = 'Reply to forum';
$string['replytoforumpost'] = 'You can reply to this forum post by email.';
$string['replytopostbyemail'] = 'If you reply to this via email, don\'t include a quoted copy of this post. ';
$string['replytouser'] = 'Use email address in reply';
$string['reply_handler'] = 'Reply to forum posts via email';
$string['reply_handler_name'] = 'Reply to forum posts';
Expand Down
12 changes: 2 additions & 10 deletions mod/forum/lib.php
Expand Up @@ -1186,10 +1186,6 @@ function forum_make_mail_text($course, $cm, $forum, $discussion, $post, $userfro

$posttext = '';

if ($replyaddress) {
$posttext .= "--" . get_string('deleteoriginalonreply', 'mod_forum') . "--\n";
}

if (!$bare) {
$shortname = format_string($course->shortname, true, array('context' => context_course::instance($course->id)));
$posttext .= "$shortname -> $strforums -> ".format_string($forum->name,true);
Expand Down Expand Up @@ -1241,7 +1237,7 @@ function forum_make_mail_text($course, $cm, $forum, $discussion, $post, $userfro
$posttext .= ": {$CFG->wwwroot}/mod/forum/index.php?id={$forum->course}\n";

if ($replyaddress) {
$posttext .= "\n\n" . get_string('replytoforumpost', 'mod_forum');
$posttext .= "\n\n" . get_string('replytopostbyemail', 'mod_forum');
}

return $posttext;
Expand Down Expand Up @@ -1286,10 +1282,6 @@ function forum_make_mail_html($course, $cm, $forum, $discussion, $post, $userfro
$posthtml .= '</head>';
$posthtml .= "\n<body id=\"email\">\n\n";

if ($replyaddress) {
$posthtml .= "<p><em>--" . get_string('deleteoriginalonreply', 'mod_forum') . "--</em></p>";
}

$posthtml .= '<div class="navbar">'.
'<a target="_blank" href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'.$shortname.'</a> &raquo; '.
'<a target="_blank" href="'.$CFG->wwwroot.'/mod/forum/index.php?id='.$course->id.'">'.$strforums.'</a> &raquo; '.
Expand All @@ -1303,7 +1295,7 @@ function forum_make_mail_html($course, $cm, $forum, $discussion, $post, $userfro
$posthtml .= forum_make_mail_post($course, $cm, $forum, $discussion, $post, $userfrom, $userto, false, $canreply, true, false);

if ($replyaddress) {
$posthtml .= html_writer::tag('p', get_string('replytoforumpost', 'mod_forum'));
$posthtml .= html_writer::tag('p', get_string('replytopostbyemail', 'mod_forum'));
}

$footerlinks = array();
Expand Down

0 comments on commit d141109

Please sign in to comment.