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:
mjollnir_
2005-11-16 22:20:43 +00:00
parent 9a109f1224
commit 29fbf0d5b8
+1 -4
View File
@@ -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);
}
}