My moodle - forums shouldn't print the forum header and all their nothing new stuff. Only talk when you've got something to say ;)
This commit is contained in:
+1
-4
@@ -737,9 +737,7 @@ function forum_user_complete($course, $user, $mod, $forum) {
|
||||
function forum_print_overview($course,$lastaccess) {
|
||||
global $USER, $CFG;
|
||||
|
||||
print_heading(get_string("modulenameplural", "forum"));
|
||||
if (!$forums = get_all_instances_in_course("forum", $course)) {
|
||||
echo get_string('nothingnew','forum',$course->fullname);
|
||||
return;
|
||||
}
|
||||
// get all forum logs in ONE query (much better!)
|
||||
@@ -779,9 +777,8 @@ function forum_print_overview($course,$lastaccess) {
|
||||
}
|
||||
}
|
||||
if (!empty($str)) {
|
||||
print_heading(get_string("modulenameplural", "forum"));
|
||||
echo $str;
|
||||
} else {
|
||||
echo get_string('nothingnew','forum',$course->fullname);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user