From: rkingdon Date: Wed, 29 Sep 2004 16:52:24 +0000 (+0000) Subject: Allow teachers to edit examples from Admin page; Count of ungraded X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ff1d392aa16ebf0c020318220f9911534292d02b;p=moodle.git 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. --- diff --git a/mod/workshop/assessments.php b/mod/workshop/assessments.php index 908929b5ba..7872726e11 100644 --- a/mod/workshop/assessments.php +++ b/mod/workshop/assessments.php @@ -747,7 +747,7 @@ } } } - redirect("submissions.php?id=$cm->id&action=adminlist"); + redirect("submissions.php?id=$cm->id&action=adminlist"); } diff --git a/mod/workshop/lib.php b/mod/workshop/lib.php index 8f82f5086f..3cfaf2d1c1 100644 --- a/mod/workshop/lib.php +++ b/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++; diff --git a/mod/workshop/locallib.php b/mod/workshop/locallib.php index 28f664456c..92045ad6a2 100644 --- a/mod/workshop/locallib.php +++ b/mod/workshop/locallib.php @@ -1247,7 +1247,7 @@ function workshop_list_submissions_for_admin($workshop, $order) { } $action .= " | id&sid=$submission->id\">". get_string("delete", "workshop").""; - $table->data[] = array(workshop_print_submission_title($workshop, $submission), $course->teacher, $action); + $table->data[] = array("id&sid=$submission->id\">$submission->title", $course->teacher, $action); } print_heading(get_string("studentsubmissions", "workshop", $course->teacher), "center"); print_table($table);