mirror of
https://github.com/moodle/moodle.git
synced 2025-03-22 00:20:37 +01:00
MDL-64240 mod_forum: Update word count to use current message length
Previously this used the length of the message stored in the database, before scripts etc are cleaned to display the content. That resulted in cases where the count would seem much larger than the message size.
This commit is contained in:
parent
33a388eff7
commit
b6995c29ec
@ -3611,7 +3611,7 @@ function forum_print_post($post, $discussion, $forum, &$cm, $course, $ownpost=fa
|
||||
$postcontent = highlight($highlight, $postcontent);
|
||||
}
|
||||
if (!empty($forum->displaywordcount)) {
|
||||
$postcontent .= html_writer::tag('div', get_string('numwords', 'moodle', count_words($post->message)),
|
||||
$postcontent .= html_writer::tag('div', get_string('numwords', 'moodle', count_words($postcontent)),
|
||||
array('class'=>'post-word-count'));
|
||||
}
|
||||
$postcontent .= html_writer::tag('div', $attachedimages, array('class'=>'attachedimages'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user