Moodle Hack: Forum email digest to make subjects more prominent

A moodle user profile setting causes the system to send a daily email with a list of changes to courses in which the user is enrolled or from forums in which they are contributors.

In the digest the subjects of the posts and changes is not emphasised in position or font size.

This hack identifies the code controlling this behaviour so that the order of the digest can be changed and the font size changed:

\\core\I$\Webstore\moodle\mod\forum\lib.php

--------------------------------------------------------------------------------
approx line 438:
// DIG changed order to make post title first

$postsubject = "$course->shortname: ".format_string($post->subject,true);
$posttext = forum_make_mail_text($post, $course, $forum, $discussion, $userfrom, $userto);
$posthtml = forum_make_mail_html($post, $course, $forum, $discussion, $userfrom, $userto);

--------------------------------------------------------------------------------
approx line 708:
Successfully increased the font size for the post subject link in the email digest by
$posthtml .= '<div><h2><a target="_blank" href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.$discussion->id.'#p'.$post->id.'">'.format_string($post->subject,true).'</a></h2> '.get_string("bynameondate", "forum", $by).'</div>';

--------------------------------------------------------------------------------
approx: line 2555:
This line prints the post title for staff who select to receive all individual posts in full as seperate emails. Makes the non-link post title bigger. Bettr if it was the linked title. Why repeat them anyway ?

$output .= '<div class="subject"><h2>'.format_string($post->subject).'</h2></div>';

No comments: