Browse files

Allow teachers to edit examples from Admin page; Count of ungraded

asessment now excludes warm and hot assessments; change a & back to a
& in a redirect call.
  • Loading branch information...
1 parent 1e55858 commit ff1d392aa16ebf0c020318220f9911534292d02b rkingdon committed Sep 29, 2004
Showing with 6 additions and 3 deletions.
  1. +1 −1 mod/workshop/assessments.php
  2. +4 −1 mod/workshop/lib.php
  3. +1 −1 mod/workshop/locallib.php
View
2 mod/workshop/assessments.php
@@ -747,7 +747,7 @@
}
}
}
- redirect("submissions.php?id=$cm->id&action=adminlist");
+ redirect("submissions.php?id=$cm->id&action=adminlist");
}
View
5 mod/workshop/lib.php
@@ -1212,10 +1212,13 @@ function workshop_compare_assessments($workshop, $assessment1, $assessment2) {
//////////////////////////////////////////////////////////////////////////////////////
function workshop_count_ungraded_assessments($workshop) {
// function returns the number of ungraded assessments by students
+ global $CFG;
+ $timenow = time();
$n = 0;
+ // get all the cold assessments that have not been graded
if ($assessments = get_records_select("workshop_assessments", "workshopid = $workshop->id AND
- timegraded = 0")) {
+ (timecreated + $CFG->maxeditingtime) < $timenow AND timegraded = 0")) {
foreach ($assessments as $assessment) {
if (isstudent($workshop->course, $assessment->userid)) {
$n++;
View
2 mod/workshop/locallib.php
@@ -1247,7 +1247,7 @@ function workshop_list_submissions_for_admin($workshop, $order) {
}
$action .= " | <a href=\"submissions.php?action=adminconfirmdelete&amp;id=$cm->id&amp;sid=$submission->id\">".
get_string("delete", "workshop")."</a>";
- $table->data[] = array(workshop_print_submission_title($workshop, $submission), $course->teacher, $action);
+ $table->data[] = array("<a href=\"submissions.php?action=editsubmission&amp;id=$cm->id&amp;sid=$submission->id\">$submission->title</a>", $course->teacher, $action);
}
print_heading(get_string("studentsubmissions", "workshop", $course->teacher), "center");
print_table($table);

0 comments on commit ff1d392

Please sign in to comment.