} 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);
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");
}
"2. ".get_string("phase2", "workshop", $course->student),
"3. ".get_string("phase5", "workshop"));
$tabs->urls = array("view.php?id=$cm->id&action=setupassignment",
- "view.php?id=$cm->id&action=allowsubmissions",
+ "view.php?id=$cm->id&action=allowboth",
"view.php?id=$cm->id&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
}