From: moodler Date: Mon, 25 Aug 2003 02:41:25 +0000 (+0000) Subject: FIxed display of ratings when they are literally "0" X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=05c47ef78e8e8724bd2b48bcedf47d4187fb0f80;p=moodle.git FIxed display of ratings when they are literally "0" Also fixed default discussion display mode --- diff --git a/mod/forum/lib.php b/mod/forum/lib.php index d4c367db33..61ce4fcd2e 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -19,7 +19,7 @@ $FORUM_OPEN_MODES = array ("2" => get_string("openmode2", "forum"), "0" => get_string("openmode0", "forum") ); if (!isset($CFG->forum_displaymode)) { - set_config("forum_display_mode", 3); + set_config("forum_displaymode", 3); } if (!isset($CFG->forum_shortpost)) { @@ -1172,8 +1172,10 @@ function forum_print_ratings_mean($postid, $scale) { /// Scale is an array of ratings static $strrate; + + $mean = forum_get_ratings_mean($postid, $scale); - if ($mean = forum_get_ratings_mean($postid, $scale)) { + if ($mean !== "") { if (empty($strratings)) { $strratings = get_string("ratings", "forum");