]> git.mjollnir.org Git - moodle.git/commitdiff
FIxed display of ratings when they are literally "0"
authormoodler <moodler>
Mon, 25 Aug 2003 02:41:25 +0000 (02:41 +0000)
committermoodler <moodler>
Mon, 25 Aug 2003 02:41:25 +0000 (02:41 +0000)
Also fixed default discussion display mode

mod/forum/lib.php

index d4c367db339a39df74f072ba6ac9a70909dc21f9..61ce4fcd2e9b0c6ffd67afa887606fcf7d434957 100644 (file)
@@ -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");