Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit b8973de69dedaee6c5009b6ee6de2c61bbe1a576 1 parent 82f5285
martin authored
Showing with 9 additions and 8 deletions.
  1. +6 −5 mod/journal/report.php
  2. +3 −3 mod/journal/view.php
View
11 mod/journal/report.php
@@ -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;
}
View
6 mod/journal/view.php
@@ -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>";
Please sign in to comment.
Something went wrong with that request. Please try again.