]> git.mjollnir.org Git - moodle.git/commitdiff
Whoops! Accidentally checked in a quick hack I did for someone.
authormoodler <moodler>
Wed, 12 Mar 2003 07:49:54 +0000 (07:49 +0000)
committermoodler <moodler>
Wed, 12 Mar 2003 07:49:54 +0000 (07:49 +0000)
mod/journal/lib.php

index 3740119a58a05ecd7ac5a3ec8a0521d410fb838f..526c13018682b0be03b0959256c5c8ed11354976 100644 (file)
@@ -1,17 +1,8 @@
 <?PHP // $Id$
 
-//$JOURNAL_RATING = array ("3" => get_string("journalrating3", "journal"),
-//                         "2" => get_string("journalrating2", "journal"),
-//                         "1" => get_string("journalrating1", "journal") );
-
-// Hack to use 0-x grades
-
-$JOURNAL_MAX = 30;
-
-$JOURNAL_RATING = array();
-for ($journal_i=$JOURNAL_MAX; $journal_i>=0; $journal_i--) {
-    $JOURNAL_RATING["$journal_i"] = "$journal_i";
-}
+$JOURNAL_RATING = array ("3" => get_string("journalrating3", "journal"),
+                         "2" => get_string("journalrating2", "journal"),
+                         "1" => get_string("journalrating1", "journal") );
 
 
 
@@ -164,7 +155,7 @@ function journal_print_recent_activity(&$logs, $isteacher=false) {
 
 function journal_grades($journalid) {
 /// Must return an array of grades, indexed by user, and a max grade.
-    global $JOURNAL_RATING, $JOURNAL_MAX;
+    global $JOURNAL_RATING;
 
     if ($return->grades = get_records_menu("journal_entries", "journal", $journalid, "", "userid,rating")) {
         foreach ($return->grades as $key => $value) {
@@ -174,7 +165,7 @@ function journal_grades($journalid) {
                 $return->grades[$key] = "-";
             }
         }
-        $return->maxgrade = $JOURNAL_MAX;
+        $return->maxgrade = "";
     }
     return $return;
 }
@@ -321,7 +312,7 @@ function journal_delete_instance($id) {
 
 
 function journal_print_feedback($course, $entry) {
-    global $CFG, $THEME, $JOURNAL_RATING, $JOURNAL_MAX;
+    global $CFG, $THEME, $JOURNAL_RATING;
 
     if (! $teacher = get_record("user", "id", $entry->teacher)) {
         error("Weird journal error");
@@ -344,7 +335,6 @@ function journal_print_feedback($course, $entry) {
     if ($JOURNAL_RATING[$entry->rating]) {
         echo get_string("overallrating", "journal").": ";
         echo $JOURNAL_RATING[$entry->rating];
-        echo " / $JOURNAL_MAX";
     } else {
         print_string("noratinggiven", "journal");
     }