Permalink
Browse files

Cron routine does not send "graded" emails until releasegrades date;

grades are "not available" in index page until after the relaesegrades
date; phasing of three phase workshop tidied up.
  • Loading branch information...
1 parent e89d741 commit 693f6eb5cfe6d0d2423eef8c78b10668e42394a4 rkingdon committed Nov 23, 2004
Showing with 11 additions and 3 deletions.
  1. +3 −0 mod/workshop/index.php
  2. +2 −1 mod/workshop/lib.php
  3. +6 −2 mod/workshop/view.php
View
3 mod/workshop/index.php
@@ -101,6 +101,9 @@
} 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);
View
3 mod/workshop/lib.php
@@ -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");
}
View
8 mod/workshop/view.php
@@ -387,7 +387,7 @@
"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"),
@@ -411,7 +411,11 @@
}
}
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
}

0 comments on commit 693f6eb

Please sign in to comment.