Moodle Hack: Require users to create subject for replies

When replying to moodle posts, the subject is auto inserted into the reply with "Re: " as a suffix.
This often results in very poorly named posts when users receive them in email digects or serach for them.

The following hack forces users to enter a new subject for their reply.

mod/ forum/ post.php

After line 177:

// Original Line: $post->subject = $parent->subject;
$post->userid = $USER->id;
$post->message = '';

$post->groupid = ($discussion->groupid == -1) ? 0 : $discussion->groupid;

// comment out the insertion of "Re:"
// $strre = get_string('re', 'forum');
// if (!(substr($post->subject, 0, strlen($strre)) == $strre)) {
// $post->subject = $strre.' '.$post->subject;
// }

No comments:

This post contains some responses to questions that I have been asked by various people over the last few years. In most cases, I have also posted the information on relevant online community forums such as moodle.org. I hope that you find this useful. Stephen Digby