]> git.mjollnir.org Git - moodle.git/commitdiff
Allow teachers to be marked, and allow ratings to be ignored
authormartin <martin>
Tue, 23 Jul 2002 17:56:52 +0000 (17:56 +0000)
committermartin <martin>
Tue, 23 Jul 2002 17:56:52 +0000 (17:56 +0000)
mod/journal/report.php
mod/journal/view.php

index 982c7b7b087969a04cee7a4c33b1d174e8996310..42c8cc6722a6c54119cd424b75ce150de731d5d3 100644 (file)
             }
         }
         add_to_log($course->id, "journal", "update feedback", "report.php?id=$cm->id", "$count students");
-        notify("Journal feedback updated for $count students.");
+        notify("Journal feedback updated for $count people.");
     } else {
         add_to_log($course->id, "journal", "view responses", "report.php?id=$cm->id", "$journal->id");
     }
 
 
-    if (! $students = get_records_sql("SELECT u.* FROM user u, user_students s 
-                                       WHERE s.course = '$course->id' AND s.user = u.id
+    if (! $students = get_records_sql("SELECT u.* FROM user u, user_students s, user_teachers t
+                                       WHERE (s.course = '$course->id' AND s.user = u.id) OR 
+                                             (t.course = '$course->id' AND t.user = u.id)
                                        ORDER BY u.lastaccess DESC")) {
-        notify("No students", "/course/view.php?id=$course->id");
+        notify("No students", "$CFG->wwwroot/course/view.php?id=$course->id");
         die;
     }
 
     if (! $teachers = get_records_sql("SELECT u.* FROM user u, user_teachers t 
                                        WHERE t.course = '$course->id' AND t.user = u.id
                                        ORDER BY u.lastaccess DESC")) {
-        notify("No teachers", "/course/view.php?id=$course->id");
+        notify("No teachers", "$CFG->wwwroot/course/view.php?id=$course->id");
         die;
     }
 
index 41dfd5aea5582659f5418b2844fcd3e275b64ef7..f2676f21326d82021eef6fb7df530cdfb45ec02d 100644 (file)
@@ -129,13 +129,13 @@ function print_feedback($course, $entry) {
     echo "</TR>";
 
     echo "\n<TR><TD WIDTH=100% BGCOLOR=\"$THEME->cellcontent\">";
-    echo "<P>Overall: ";
     if ($RATING[$entry->rating]) {
+        echo "<P>Overall: ";
         echo $RATING[$entry->rating];
+        echo "</P>";
     } else {
-        echo "Error";
+        echo "<P>No rating given</P>";
     }
-    echo "</P>";
     echo text_to_html($entry->comment);
     echo "</TD></TR></TABLE>";