Cron routine does not send "graded" emails until releasegrades date;
authorrkingdon <rkingdon>
Tue, 23 Nov 2004 20:52:54 +0000 (20:52 +0000)
committerrkingdon <rkingdon>
Tue, 23 Nov 2004 20:52:54 +0000 (20:52 +0000)
grades are "not available" in index page until after the relaesegrades
date; phasing of three phase workshop tidied up.

mod/workshop/index.php
mod/workshop/lib.php
mod/workshop/view.php

index 8fd57ed80ed188b9617092d9578a6fbc297d57a7..9c2c4d013cd207734374e5bc706a100765a08bbb 100644 (file)
                      } else { // simple assignemnt, don't show grading grade 
                         $info = get_string("gradeforsubmission", "workshop").": $grade/$workshop->grade";
                     }
+                    if ($workshop->releasegrades > $timenow) {
+                        $info = get_string("notavailable", "workshop");
+                    }
                 }
                 if ($course->format == "weeks" or $course->format == "topics") {
                     $table->data[] = array ($workshop->section, $link, $info, $submitted, $due);
index d1cd42a355a0ae11aea6f291cec70a63c3b37688..356fb3bcafc7702d1515402400b7fdd5885952f0 100644 (file)
@@ -1360,7 +1360,8 @@ function workshop_get_unmailed_assessments($cutofftime) {
                               FROM {$CFG->prefix}workshop_assessments a, {$CFG->prefix}workshop g
                              WHERE a.mailed = 0 
                                AND a.timecreated < $cutofftime 
-                               AND g.id = a.workshopid");
+                               AND g.id = a.workshopid
+                               AND g.releasegrades < $cutoffime");
 }
 
 
index 23c37d91fbb538c0cbb0a481dadb51e53d0ae5e6..445ecbd7186c08320c26c36db6355c7eac669ee6 100644 (file)
                             "2. ".get_string("phase2", "workshop", $course->student), 
                             "3. ".get_string("phase5", "workshop"));
             $tabs->urls = array("view.php?id=$cm->id&amp;action=setupassignment", 
-                "view.php?id=$cm->id&amp;action=allowsubmissions",
+                "view.php?id=$cm->id&amp;action=allowboth",
                 "view.php?id=$cm->id&amp;action=makefinalgradesavailable");
         } else {
             $tabs->names = array("1. ".get_string("phase1", "workshop"), 
             }
         }
         if ($workshop->phase) { // phase 1 or more
-            $tabs->highlight = $workshop->phase - 1;
+            if ($workshop->wtype < 2) {
+                $tabs->highlight = ($workshop->phase - 1) / 2;
+            } else {
+                $tabs->highlight = $workshop->phase - 1;
+            }
         } else {
             $tabs->highlight = 0; // phase is zero
         }