]> git.mjollnir.org Git - moodle.git/commitdiff
Display of current/final grades now has the individual lists order by
authorrkingdon <rkingdon>
Sat, 13 Nov 2004 01:00:17 +0000 (01:00 +0000)
committerrkingdon <rkingdon>
Sat, 13 Nov 2004 01:00:17 +0000 (01:00 +0000)
grade.

mod/workshop/lib.php
mod/workshop/locallib.php

index b6310a41650dc4c4e911821a2871fce561f518f3..d1cd42a355a0ae11aea6f291cec70a63c3b37688 100644 (file)
@@ -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);
     }
 }
 
index e803c2423f9f79e39e414b9e67586ccd09baa2df..6011ede7fa63fe8c0fb23b4381e539c237da0e4e 100644 (file)
@@ -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