Allow teachers to be marked, and allow ratings to be ignored

This commit is contained in:
martin
2002-07-23 17:56:52 +00:00
parent 82f5285f5f
commit b8973de69d
2 changed files with 9 additions and 8 deletions
+6 -5
View File
@@ -74,23 +74,24 @@
}
}
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;
}
+3 -3
View 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>";