Permalink
Browse files

Display of current/final grades now has the individual lists order by

grade.
  • Loading branch information...
1 parent 65e187e commit cb0a172434e4ffa9716d227a5c860dfc21c4f5dd rkingdon committed Nov 13, 2004
Showing with 9 additions and 4 deletions.
  1. +7 −3 mod/workshop/lib.php
  2. +2 −1 mod/workshop/locallib.php
View
@@ -1221,19 +1221,23 @@ function workshop_get_assess_logs($course, $timestart) {
//////////////////////////////////////////////////////////////////////////////////////
-function workshop_get_assessments($submission, $all = '') {
+function workshop_get_assessments($submission, $all = '', $order = '') {
// Return assessments for this submission ordered oldest first, newest last
// new assessments made within the editing time are NOT returned unless the
// second argument is set to ALL
global $CFG;
+
+ if (!$order) {
+ $order = "timecreated DESC";
+ }
if ($all != 'ALL') {
$timenow = time();
return get_records_select("workshop_assessments", "(submissionid = $submission->id) AND
- (timecreated < $timenow - $CFG->maxeditingtime)", "timecreated DESC");
+ (timecreated < $timenow - $CFG->maxeditingtime)", $order);
} else {
return get_records_select("workshop_assessments", "submissionid = $submission->id",
- "timecreated DESC");
+ $order);
}
}
@@ -2747,7 +2747,8 @@ function workshop_print_submission_assessments($workshop, $submission, $type) {
}
$str = '';
- if ($assessments = workshop_get_assessments($submission)) {
+ // get the cold assessments in grade order, highest first
+ if ($assessments = workshop_get_assessments($submission, "cold", "grade DESC")) {
switch ($type) {
case "teacher" :
// students can see teacher assessments only if the release date has passed

0 comments on commit cb0a172

Please sign in to comment.