postid: $(currentRoot).data('post-id'),
"reply_url": $(e.currentTarget).attr('href'),
sesskey: M.cfg.sesskey,
- parentsubject: currentSubject.html(),
+ parentsubject: currentSubject.data('replySubject'),
canreplyprivately: $(e.currentTarget).data('can-reply-privately'),
postformat: InPageReply.CONTENT_FORMATS.MOODLE
};
return [
'id' => ['type' => PARAM_INT],
'subject' => ['type' => PARAM_TEXT],
+ 'replysubject' => ['type' => PARAM_TEXT],
'message' => ['type' => PARAM_RAW],
'messageformat' => ['type' => PARAM_INT],
'author' => ['type' => author_exporter::read_properties_definition()],
}
}
+ $replysubject = $subject;
+ $strre = get_string('re', 'forum');
+ if (!(substr($replysubject, 0, strlen($strre)) == $strre)) {
+ $replysubject = "{$strre} {$replysubject}";
+ }
+
return [
'id' => $post->get_id(),
'subject' => $subject,
+ 'replysubject' => $replysubject,
'message' => $message,
'messageformat' => $post->get_message_format(),
'author' => $exportedauthor,
--- /dev/null
+inpagereplysubject,mod_forum
$string['invalidforumid'] = 'Forum ID was incorrect';
$string['invalidparentpostid'] = 'Parent post ID was incorrect';
$string['invalidpostid'] = 'Invalid post ID - {$a}';
-$string['inpagereplysubject'] = 'Re: {$a}';
$string['lastpost'] = 'Last post';
$string['learningforums'] = 'Learning forums';
$string['lockdiscussionafter'] = 'Lock discussions after period of inactivity';
$string['yourreply'] = 'Your reply';
$string['forumsubjectdeleted'] = 'This forum post has been removed';
$string['forumbodydeleted'] = 'The content of this forum post has been removed and can no longer be accessed.';
+
+// Deprecated since Moodle 3.8.
+$string['inpagereplysubject'] = 'Re: {$a}';
{{#parentauthorname}}
<span class="sr-only">{{#str}} inreplyto, mod_forum, {{.}} {{/str}}</span>
{{/parentauthorname}}
- <h3 class="h6 font-weight-bold mb-0" data-region-content="forum-post-core-subject">{{$subject}}{{{subject}}}{{/subject}}</h3>
+ <h3 {{!
+ }}class="h6 font-weight-bold mb-0" {{!
+ }}data-region-content="forum-post-core-subject" {{!
+ }}data-reply-subject="{{replysubject}}" {{!
+ }}>{{$subject}}{{{subject}}}{{/subject}}</h3>
{{^isdeleted}}
<address tabindex="-1">
{{#html.authorsubheading}}{{{.}}}{{/html.authorsubheading}}
<textarea rows="5" name="post" title="post" class="w-100" placeholder="{{#str}} replyplaceholder, forum {{/str}}"></textarea>
<input type="hidden" name="postformat" value="{{postformat}}"/>
</span>
- <input type="hidden" name="subject" value="{{#str}} inpagereplysubject, forum, {{parentsubject}} {{/str}}"/>
+ <input type="hidden" name="subject" value="{{parentsubject}}"/>
<input type="hidden" name="reply" value="{{postid}}"/>
<input type="hidden" name="sesskey" value="{{sesskey}}"/>
</div>
'hasparent' => true,
'timecreated' => $discussion1reply2->created,
'subject' => $discussion1reply2->subject,
+ 'replysubject' => get_string('re', 'mod_forum') . " {$discussion1reply2->subject}",
'message' => file_rewrite_pluginfile_urls($discussion1reply2->message, 'pluginfile.php',
$forum1context->id, 'mod_forum', 'post', $discussion1reply2->id),
'messageformat' => 1, // This value is usually changed by external_format_text() function.
'hasparent' => true,
'timecreated' => $discussion1reply1->created,
'subject' => $discussion1reply1->subject,
+ 'replysubject' => get_string('re', 'mod_forum') . " {$discussion1reply1->subject}",
'message' => file_rewrite_pluginfile_urls($discussion1reply1->message, 'pluginfile.php',
$forum1context->id, 'mod_forum', 'post', $discussion1reply1->id),
'messageformat' => 1, // This value is usually changed by external_format_text() function.