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.
This commit is contained in:
rkingdon 2004-09-29 16:52:24 +00:00
parent 1e55858281
commit ff1d392aa1
3 changed files with 6 additions and 3 deletions

View File

@ -747,7 +747,7 @@
} }
} }
} }
redirect("submissions.php?id=$cm->id&action=adminlist"); redirect("submissions.php?id=$cm->id&action=adminlist");
} }

View File

@ -1212,10 +1212,13 @@ function workshop_compare_assessments($workshop, $assessment1, $assessment2) {
////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////
function workshop_count_ungraded_assessments($workshop) { function workshop_count_ungraded_assessments($workshop) {
// function returns the number of ungraded assessments by students // function returns the number of ungraded assessments by students
global $CFG;
$timenow = time();
$n = 0; $n = 0;
// get all the cold assessments that have not been graded
if ($assessments = get_records_select("workshop_assessments", "workshopid = $workshop->id AND if ($assessments = get_records_select("workshop_assessments", "workshopid = $workshop->id AND
timegraded = 0")) { (timecreated + $CFG->maxeditingtime) < $timenow AND timegraded = 0")) {
foreach ($assessments as $assessment) { foreach ($assessments as $assessment) {
if (isstudent($workshop->course, $assessment->userid)) { if (isstudent($workshop->course, $assessment->userid)) {
$n++; $n++;

View File

@ -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\">". $action .= " | <a href=\"submissions.php?action=adminconfirmdelete&amp;id=$cm->id&amp;sid=$submission->id\">".
get_string("delete", "workshop")."</a>"; 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_heading(get_string("studentsubmissions", "workshop", $course->teacher), "center");
print_table($table); print_table($table);