addition of on-the-fly grading of assessments; some bugs cleared.
listungradedstudentsubmissions (for teachers)
listungradedteachersubmissions (for teachers)
listteachersubmissions
+ regradestudentassessments (for teachers)
updateassessment
updatecomment
updategrading
if (! $submission = get_record("workshop_submissions", "id", $sid)) {
error("Assess submission is misconfigured - no submission record!");
}
-
+
// there can be an assessment record (for teacher submissions), if there isn't...
if (!$assessment = get_record("workshop_assessments", "submissionid", $submission->id, "userid",
$USER->id)) {
- $yearfromnow = time() + 365 * 86400;
- // ...create one and set timecreated way in the future, this is reset when record is updated
- $assessment->workshopid = $workshop->id;
- $assessment->submissionid = $submission->id;
- $assessment->userid = $USER->id;
- $assessment->grade = -1; // set impossible grade
- $assessment->timecreated = $yearfromnow;
- $assessment->timegraded = 0;
- $assessment->timeagreed = 0;
- $assessment->resubmission = 0;
- if (!$assessment->id = insert_record("workshop_assessments", $assessment)) {
- error("Could not insert workshop assessment!");
- }
- }
+ // if it's the teacher see if the user has done a self assessment if so copy it
+ if (isteacher($course->id) and ($assessment = get_record("workshop_assessments", "submissionid",
+ $submission->id, "userid", $submission->userid))) {
+ $assessment = workshop_copy_assessment($assessment, $submission, true);
+ // need to set owner of assessment
+ set_field("workshop_assessments", "userid", $USER->id, "id", $assessment->id);
+ $assessment->resubmission = 0; // not set by workshop_copy_assessment
+ $assessment->timegraded = 0; // not set by workshop_copy_assessment
+ $assessment->timeagreed = 0; // not set by workshop_copy_assessment
+ } else {
+ $yearfromnow = time() + 365 * 86400;
+ // ...create one and set timecreated way in the future, this is reset when record is updated
+ $assessment->workshopid = $workshop->id;
+ $assessment->submissionid = $submission->id;
+ $assessment->userid = $USER->id;
+ $assessment->timecreated = $yearfromnow;
+ $assessment->grade = -1; // set impossible grade
+ $assessment->timegraded = 0;
+ $assessment->timeagreed = 0;
+ $assessment->resubmission = 0;
+ if (!$assessment->id = insert_record("workshop_assessments", $assessment)) {
+ error("Could not insert workshop assessment!");
+ }
+ }
+ }
print_heading_with_help(get_string("assessthissubmission", "workshop"), "grading", "workshop");
// show assessment and allow changes
workshop_print_assessment($workshop, $assessment, true, $allowcomments, $_SERVER["HTTP_REFERER"]);
- }
+ }
/*************** display grading form (viewed by student) *********************************/
}
+ /******************* regrade student assessments ************************************/
+ elseif ($action == 'regradestudentassessments' ) {
+
+ $timenow = time();
+ if (!isteacher($course->id)) {
+ error("Only teachers can look at this page");
+ }
+ // get all the teacher assessments
+ if ($assessments = workshop_get_teacher_assessments($workshop)) {
+ foreach ($assessments as $teacherassessment) {
+ if (!$submission = get_record("workshop_submissions", "id", $teacherassessment->submissionid)) {
+ error("Regrade student assessments: submission not found");
+ }
+ // run through the student assessments of this submission
+ if ($studentassessments = get_records("workshop_assessments", "submissionid", $submission->id)) {
+ foreach ($studentassessments as $studentassessment) {
+ if (!isstudent($course->id, $studentassessment->userid)) {
+ continue; // not a student assessment - skip
+ }
+ $newgrade = workshop_compare_assessments($workshop, $studentassessment, $teacherassessment);
+ set_field("workshop_assessments", "gradinggrade", $newgrade, "id", $studentassessment->id);
+ set_field("workshop_assessments", "timegraded", $timenow, "id", $studentassessment->id);
+ }
+ }
+ }
+ }
+ redirect("submissions.php?id=$cm->id&action=adminlist");
+ }
+
+
/*************** update assessment (by teacher or student) ***************************/
elseif ($action == 'updateassessment') {
// don't fiddle about, delete all the old and add the new!
delete_records("workshop_grades", "assessmentid", $assessment->id);
- $form = (object)$HTTP_POST_VARS;
+ $form = data_submitted("nomatch"); // probably always come from the same page, change this statement
//determine what kind of grading we have
switch ($workshop->gradingstrategy) {
set_field("workshop_assessments", "timeagreed", $timenow, "id", $assessment->id);
}
+ // set grade...
set_field("workshop_assessments", "grade", $grade, "id", $assessment->id);
- // ...and clear any grading of this assessment...
+ // ...and clear the timegraded but set the graddinggrade to maximum, may to reduced subsequently...
set_field("workshop_assessments", "timegraded", 0, "id", $assessment->id);
- set_field("workshop_assessments", "gradinggrade", 0, "id", $assessment->id);
+ set_field("workshop_assessments", "gradinggrade", 100, "id", $assessment->id);
// ...and the resubmission flag
set_field("workshop_assessments", "resubmission", 0, "id", $assessment->id);
+
+ // now see if there's a corresponding assessment so that the gradinggrade can be set
+ if (isteacher($course->id)) {
+ // see if there's are student assessments, if so set their gradinggrade
+ if ($assessments = workshop_get_assessments($submission)) {
+ foreach($assessments as $studentassessment) {
+ // skip if it's not a student assessment
+ if (!isstudent($course->id, $studentassessment->userid)) {
+ continue;
+ }
+ $gradinggrade = workshop_compare_assessments($workshop, $assessment, $studentassessment);
+ set_field("workshop_assessments", "timegraded", $timenow, "id", $studentassessment->id);
+ set_field("workshop_assessments", "gradinggrade", $gradinggrade, "id", $studentassessment->id);
+ }
+ }
+ } else { //it's a student assessment, see if there's a corresponding teacher's assessment
+ if ($assessments = workshop_get_assessments($submission)) {
+ foreach($assessments as $teacherassessment) {
+ if (isteacher($course->id, $teacherassessment->userid)) {
+ $gradinggrade = workshop_compare_assessments($workshop, $assessment, $teacherassessment);
+ set_field("workshop_assessments", "timegraded", $timenow, "id", $assessment->id);
+ set_field("workshop_assessments", "gradinggrade", $gradinggrade, "id", $assessment->id);
+ break; // only look for the first teacher assessment
+ }
+ }
+ }
+ }
// any comment?
if (!empty($form->generalcomment)) {
fwrite ($bf,full_tag("NAME",4,false,$workshop->name));
fwrite ($bf,full_tag("DESCRIPTION",4,false,$workshop->description));
fwrite ($bf,full_tag("NELEMENTS",4,false,$workshop->nelements));
+ fwrite ($bf,full_tag("NATTACHMENTS",4,false,$workshop->nattachments));
fwrite ($bf,full_tag("PHASE",4,false,$workshop->phase));
fwrite ($bf,full_tag("FORMAT",4,false,$workshop->format));
fwrite ($bf,full_tag("GRADINGSTRATEGY",4,false,$workshop->gradingstrategy));
fwrite ($bf,full_tag("TITLE",6,false,$wor_sub->title));
fwrite ($bf,full_tag("TIMECREATED",6,false,$wor_sub->timecreated));
fwrite ($bf,full_tag("MAILED",6,false,$wor_sub->mailed));
+ fwrite ($bf,full_tag("DESCRIPTION",6,false,$wor_sub->description));
fwrite ($bf,full_tag("TEACHERGRADE",6,false,$wor_sub->teachergrade));
fwrite ($bf,full_tag("PEERGRADE",6,false,$wor_sub->peergrade));
fwrite ($bf,full_tag("BIASGRADE",6,false,$wor_sub->biasgrade));
execute_sql("ALTER TABLE `{$CFG->prefix}workshop` DROP COLUMN `assessmentstodrop`");
}
+ if ($oldversion < 2004092400) {
+ table_column("workshop", "", "nattachments", "INTEGER", "4", "UNSIGNED", "0", "NOT NULL", "nelements");
+ table_column("workshop_submissions", "", "description", "TEXT", "", "", "", "", "mailed");
+ execute_sql("ALTER TABLE `{$CFG->prefix}workshop_submissions` ADD INDEX (`userid`)");
+ execute_sql("ALTER TABLE `{$CFG->prefix}workshop_assessments` ADD INDEX (`submissionid`)");
+ execute_sql("ALTER TABLE `{$CFG->prefix}workshop_assessments` ADD INDEX (`userid`)");
+ }
+
return true;
}
`name` varchar(255) NOT NULL default '',
`description` text NOT NULL,
`nelements` tinyint(3) unsigned NOT NULL default '1',
+ `nattachments` tinyint(3) unsigned NOT NULL default '0',
`phase` tinyint(2) unsigned NOT NULL default '0',
`format` tinyint(2) unsigned NOT NULL default '0',
`gradingstrategy` tinyint(2) unsigned NOT NULL default '1',
`title` varchar(100) NOT NULL default '',
`timecreated` int(10) unsigned NOT NULL default '0',
`mailed` tinyint(2) unsigned NOT NULL default '0',
+ `description` text NOT NULL,
`teachergrade` int(3) unsigned NOT NULL default '0',
`peergrade` int(3) unsigned NOT NULL default '0',
`biasgrade` int(3) unsigned NOT NULL default '0',
`gradinggrade` int(3) unsigned NOT NULL default '0',
`finalgrade` int(3) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
- INDEX `title` (`title`)
+ INDEX `userid` (`userid`)
) COMMENT='Info about submitted work from teacher and students';
# --------------------------------------------------------
`donotuse` tinyint(3) unsigned NOT NULL default '0',
`generalcomment` text NOT NULL,
`teachercomment` text NOT NULL,
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ INDEX (`submissionid`),
+ INDEX (`userid`)
) COMMENT='Info about assessments by teacher and students';
# --------------------------------------------------------
`elementno` int(10) unsigned NOT NULL default '0',
`feedback` text NOT NULL default '',
`grade` tinyint(3) NOT NULL default '0',
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ INDEX (`assessmentid`)
) COMMENT='Info about individual grades given to each element';
# --------------------------------------------------------
}
}
}
- else {
+ else { // no submission
$submitted = get_string("no");
$due = userdate($workshop->deadline);
if (!$workshop->visible) {
//Show normal if the mod is visible
$link = "<a href=\"view.php?id=$workshop->coursemodule\">$workshop->name</a>";
}
+ if (isstudent($course->id)) {
+ $info = '0';
+ }
if ($course->format == "weeks" or $course->format == "topics") {
$table->data[] = array ($workshop->section, $link, $info, $submitted, $due);
}
// if there any ungraded assessments run the grading routine
if ($workshops = get_records("workshop")) {
foreach ($workshops as $workshop) {
- if (workshop_count_ungraded_assessments($workshop)) {
- workshop_grade_assessments($workshop);
+ // automatically grade assessments if workshop has examples and/or peer assessments
+ if ($workshop->ntassessments or $workshop->nsassessments) {
+ if (workshop_count_ungraded_assessments($workshop)) {
+ workshop_grade_assessments($workshop);
+ }
}
}
}
if ($students = get_course_students($workshop->course)) {
foreach ($students as $student) {
$gradinggrade = workshop_gradinggrade($workshop, $student);
+ $bestgrade = 0;
if ($submissions = workshop_get_user_submissions($workshop, $student)) {
- $bestgrade = 0;
foreach ($submissions as $submission) {
$grade = workshop_submission_grade($workshop, $submission);
if ($grade > $bestgrade) {
//////////////////////////////////////////////////////////////////////////////////////
function workshop_count_ungraded_assessments($workshop) {
- // function returns the number of ungraded assessments (assessments must be warm or cold)
+ // function returns the number of ungraded assessments by students
- $timenow = time();
- return count_records_select("workshop_assessments", "workshopid = $workshop->id AND
- timecreated < $timenow AND timegraded = 0") ;
+ $n = 0;
+ if ($assessments = get_records_select("workshop_assessments", "workshopid = $workshop->id AND
+ timegraded = 0")) {
+ foreach ($assessments as $assessment) {
+ if (isstudent($workshop->course, $assessment->userid)) {
+ $n++;
+ }
+ }
}
+ return $n;
+}
//////////////////////////////////////////////////////////////////////////////////////
if ($order == "name") {
$order = "a.lastname, a.firstname";
}
-
+ if ($order == "time") {
+ $order = "s.timecreated ASC";
+ }
// make sure it works on the site course
$select = "u.course = '$workshop->course' AND";
$site = get_site();
}
}
for ($i = 0; $i < $workshop->nelements; $i++) {
- $sd[$i] = sqrt($var[$i] / ($n - 1));
+ if ($n > 1) {
+ $sd[$i] = sqrt($var[$i] / ($n - 1));
+ } else {
+ $sd[$i] = 0;
+ }
echo "<p align=\"center\">".get_string("standarddeviationofelement", "workshop", $i+1)." $sd[$i]<br />";
if ($sd[$i] <= $minvar) {
print_string("standarddeviationnote", "workshop")."<br />\n";
}
// ...if there are three or more assessments calculate the variance of each assessment.
- // Use the variance to find the "best" assessment. (When there are two assessments they
- // are both "best", we cannot distinguish between them.)
+ // Use the variance to find the "best" assessment. (When there is only one or two assessments they
+ // are not altered by this routine.)
foreach ($submissions as $submission) {
if ($nassessments[$submission->id] > 2) {
if ($assessments = workshop_get_assessments($submission)) {
$ndrop = 0;
foreach ($submissions as $submission) {
if ($assessments = workshop_get_assessments($submission)) {
- if ($nassessments[$submission->id] > 2) {
+ if ($nassessments[$submission->id] > 2) { // only alter if there are three or more assessments
if (!$best = get_record("workshop_assessments", "id", $bestassessment[$submission->id])) {
error("Workshop assessment analysis: cannot find best assessment");
}
}
}
}
- } else { // only one or two assessments, set it/both as "best"
- foreach ($assessments as $assessment) {
- set_field("workshop_assessments", "gradinggrade", 100, "id", $assessment->id);
- set_field("workshop_assessments", "timegraded", $timenow, "id", $assessment->id);
- }
}
}
}
workshop_get_student_submission_assessments($workshop) {
workshop_get_student_submissions($workshop) { ---> in lib.php
workshop_get_submission_assessment($submission, $user) {
+workshop_get_teacher_assessments($workshop) {
workshop_get_teacher_submission_assessments($workshop) {
workshop_get_teacher_submissions($workshop) {
workshop_get_ungraded_assessments($workshop) {
continue; // skip this user
}
}
+ // check if submission is cold
+ if (($submission->timecreated + $CFG->maxeditingtime) > $timenow) {
+ continue; // skip this submission
+ }
// teacher assessed this submission
if (! count_records_select("workshop_assessments", "submissionid = $submission->id AND
userid = $user->id AND timecreated < $timenow - $CFG->maxeditingtime")) {
}
+//////////////////////////////////////////////////////////////////////////////////////
+function workshop_get_teacher_assessments($workshop) {
+// Return all teacher assessments, ordered by timecreated, oldest first
+ global $CFG;
+
+ return get_records_sql("SELECT a.* FROM {$CFG->prefix}workshop_assessments a,
+ {$CFG->prefix}user_teachers u
+ WHERE u.course = $workshop->course
+ AND a.userid = u.userid
+ AND a.workshopid = $workshop->id
+ ORDER BY a.timecreated");
+}
+
+
//////////////////////////////////////////////////////////////////////////////////////
function workshop_get_teacher_submission_assessments($workshop) {
// Return all assessments on the teacher submissions, order by youngest first, oldest last
function workshop_get_ungraded_assessments($workshop) {
global $CFG;
// Return all assessments which have not been graded or just graded
- $cutofftime =time() - $CFG->maxeditingtime;
+ $cutofftime = time() - $CFG->maxeditingtime;
return get_records_select("workshop_assessments", "workshopid = $workshop->id AND (timegraded = 0 OR
timegraded > $cutofftime)", "timecreated");
}
//////////////////////////////////////////////////////////////////////////////////////
function workshop_list_assessed_submissions($workshop, $user) {
// list the submissions that have been assessed by this user and are COLD
- global $CFG;
+ global $CFG, $USER;
+ $timenow = time();
if (! $cm = get_coursemodule_from_instance("workshop", $workshop->id, $workshop->course)) {
error("Course Module ID was incorrect");
}
$table->cellspacing = 0;
if ($assessments = workshop_get_student_assessments($workshop, $user)) {
- $timenow = time();
foreach ($assessments as $assessment) {
$comment = "";
$submission = get_record("workshop_submissions", "id", $assessment->submissionid);
$action .= " | <a href=\"assessments.php?action=assesssubmission&id=$cm->id&sid=$submission->id\">".
get_string("reassess", "workshop")."</a>";
} else {
- $action = "";
+ $action = "<a href=\"assessments.php?action=viewassessment&id=$cm->id&aid=$assessment->id&".
+ "allowcomments=false\">".get_string("view", "workshop")."</a>";
}
} else {
- if ($assessment->timegraded) {
+ // if it been graded allow student to re-assess, except if it's a self assessment
+ if ($assessment->timegraded and !($USER->id == $assessment->userid)) {
$action = "<a href=\"assessments.php?action=assesssubmission&id=$cm->id&sid=$submission->id\">".
get_string("reassess", "workshop")."</a>";
} else {
number_format($assessment->gradinggrade * $workshop->gradinggrade / 100, 0)).
" / $workshop->gradinggrade";
}
- // if peer agrrements show whether agreement has been reached
+ // if peer agreements show whether agreement has been reached
if ($workshop->agreeassessments) {
if ($assessment->timeagreed) {
$comment .= "; ".get_string("assessmentwasagreedon", "workshop",
// list user's submissions for the user to assess
global $CFG;
+ $timenow = time();
if (! $cm = get_coursemodule_from_instance("workshop", $workshop->id, $workshop->course)) {
error("Course Module ID was incorrect");
}
// get the user's submissions
if ($submissions = workshop_get_user_submissions($workshop, $user)) {
foreach ($submissions as $submission) {
- $comment = "";
+ $comment = get_string("ownwork", "workshop"); // just in case they don't know!
if (!$assessment = get_record_select("workshop_assessments", "submissionid = $submission->id AND
userid = $user->id")) {
- if ($submission->userid == $user->id) { // this will always be true
- $comment = get_string("ownwork", "workshop"); // just in case they don't know!
- }
$action = "<a href=\"assessments.php?action=assesssubmission&id=$cm->id&sid=$submission->id\">".
get_string("assess", "workshop")."</a>";
$table->data[] = array(workshop_print_submission_title($workshop, $submission), $action, $comment);
+ } else {
+ // may still be warm
+ if (($assessment->timecreated + $CFG->maxeditingtime) > $timenow) {
+ $action = "<a href=\"assessments.php?action=assesssubmission&id=$cm->id&sid=$submission->id\">".
+ get_string("reassess", "workshop")."</a>";
+ $table->data[] = array(workshop_print_submission_title($workshop, $submission), $action, $comment);
}
}
+
}
+ }
if (isset($table->data)) {
echo "<p><center><b>".get_string("pleaseassessyoursubmissions", "workshop", $course->student).
"</b></center><br />\n";
print_table($table);
- }
}
+}
//////////////////////////////////////////////////////////////////////////////////////
error("Workshop_list_submissions_for_admin: Submission record not found!");
}
$title .= $submission->title;
- if ($assessment->timegraded) {
+ if ($workshop->agreeassessments and !$assessment->timeagreed and
+ isstudent($workshop->course, $submission->userid)) { // agreements for student work only
+ $title .= " <<".number_format($assessment->grade * $workshop->grade / 100, 0)." (".
+ number_format($assessment->gradinggrade * $workshop->gradinggrade / 100, 0).")>> ";
+ } elseif ($assessment->timegraded) {
if ($assessment->gradinggrade) {
// a good assessment
$title .= " {".number_format($assessment->grade * $workshop->grade / 100, 0)." (".
number_format($assessment->gradinggrade * $workshop->gradinggrade / 100, 0).")} ";
} else {
// a poor assessment
- $title .= " <".number_format($assessment->grade * $workshop->grade / 100, 0)." (".
- number_format($assessment->gradinggrade * $workshop->gradinggrade / 100, 0).")> ";
+ $title .= " <".number_format($assessment->grade * $workshop->grade / 100, 0)." (".
+ number_format($assessment->gradinggrade * $workshop->gradinggrade / 100, 0).")> ";
}
} else {
// not yet graded
- $title .= " {".number_format($assessment->grade * $workshop->grade / 100, 0)." (-)} ";
+ $title .= " {".number_format($assessment->grade * $workshop->grade / 100, 0)." ((".
+ number_format($assessment->gradinggrade * $workshop->gradinggrade / 100, 0)."))} ";
}
if ($realassessments = workshop_count_user_assessments_done($workshop, $user)) {
$action = "<a href=\"assessments.php?action=adminlistbystudent&id=$cm->id&userid=$user->id\">".
number_format($stats->min* $workshop->gradinggrade / 100, 1));
print_heading(get_string("gradinggrade", "workshop")." ".get_string("analysis", "workshop"));
print_table($table);
+ echo "<p align=\"center\"><a href=\"assessments.php?id=$cm->id&action=regradestudentassessments\">".
+ get_string("regradestudentassessments", "workshop")."</a> ";
+ helpbutton("regrading", get_string("regradestudentassessments", "workshop"), "workshop");
+ echo "</p>\n";
}
}
//////////////////////////////////////////////////////////////////////////////////////
function workshop_list_teacher_submissions($workshop, $user) {
global $CFG;
+
+ // set threshold on re-assessments
+ $reassessthreshold = 80;
if (! $cm = get_coursemodule_from_instance("workshop", $workshop->id, $workshop->course)) {
error("Course Module ID was incorrect");
$action = "<a href=\"assessments.php?action=assesssubmission&id=$cm->id&sid=$submission->id\">".
get_string("assess", "workshop")."</a>";
}
- elseif ($assessment->timegraded) {
- // allow student to improve on their assessment once it's been graded
+ elseif ($assessment->timegraded and ($assessment->gradinggrade < $reassessthreshold)) {
+ // allow student to improve on their assessment once it's been graded and is below threshold
$action = "<a href=\"assessments.php?action=assesssubmission&id=$cm->id&sid=$submission->id\">".
get_string("reassess", "workshop")."</a>";
} else {
- // allow student just to see their assessment if it hasn't been graded
+ // allow student just to see their assessment if it hasn't been graded (or above threshold)
$action = "<a href=\"assessments.php?action=viewassessment&id=$cm->id&aid=$assessment->id\">".
get_string("view", "workshop")."</a>";
}
// list the student submissions not assessed by this user
global $CFG;
+ $timenow = time();
if (! $cm = get_coursemodule_from_instance("workshop", $workshop->id, $workshop->course)) {
error("Course Module ID was incorrect");
}
}
$table->head = array (get_string("title", "workshop"), get_string("submittedby", "workshop"),
- get_string("action", "workshop"), get_string("comment", "workshop"));
- $table->align = array ("LEFT", "LEFT", "LEFT", "LEFT");
- $table->size = array ("*", "*", "*", "*");
+ get_string("submitted", "workshop"), get_string("action", "workshop"), get_string("comment", "workshop"));
+ $table->align = array ("left", "left", "left", "left", "left");
+ $table->size = array ("*", "*", "*", "*", "*");
$table->cellpadding = 2;
$table->cellspacing = 0;
- if ($submissions = workshop_get_student_submissions($workshop)) {
+ if ($submissions = workshop_get_student_submissions($workshop, 'time')) { // oldest first
foreach ($submissions as $submission) {
// check group membership, if necessary
if ($groupid) {
continue; // skip this user
}
}
+ // see if submission is cold
+ if (($submission->timecreated +$CFG->maxeditingtime) > $timenow) {
+ continue; // skip this submission
+ }
$comment = "";
+ $timegap = get_string("ago", "workshop", format_time($submission->timecreated - $timenow));
// see if user already graded this assessment
if ($assessment = get_record_select("workshop_assessments", "submissionid = $submission->id
AND userid = $user->id")) {
- $timenow = time();
if (($timenow - $assessment->timecreated < $CFG->maxeditingtime)) {
// last chance salon
$submissionowner = get_record("user", "id", $submission->userid);
$action = "<a href=\"assessments.php?action=assesssubmission&id=$cm->id&sid=$submission->id\">".
get_string("edit", "workshop")."</a>";
$table->data[] = array(workshop_print_submission_title($workshop, $submission),
- fullname($submissionowner), $action, $comment);
+ fullname($submissionowner), $timegap, $action, $comment);
}
}
else { // no assessment
$action = "<a href=\"assessments.php?action=assesssubmission&id=$cm->id&sid=$submission->id\">".
get_string("assess", "workshop")."</a>";
$table->data[] = array(workshop_print_submission_title($workshop, $submission),
- fullname($submissionowner), $action, $comment);
+ fullname($submissionowner), $timegap, $action, $comment);
}
}
if (isset($table->data)) {
foreach ($submissions as $submission) {
// allow user to delete a submission if it's warm
if ($submission->timecreated > ($timenow - $CFG->maxeditingtime)) {
- $action = "<a href=\"submissions.php?action=userconfirmdelete&id=$cm->id&sid=$submission->id\">".
+ $action = "<a href=\"submissions.php?action=editsubmission&id=$cm->id&sid=$submission->id\">".
+ get_string("edit", "workshop")."</a> | ".
+ "<a href=\"submissions.php?action=userconfirmdelete&id=$cm->id&sid=$submission->id\">".
get_string("delete", "workshop")."</a>";
}
else {
if (!$submission = get_record("workshop_submissions", "id", $assessment->submissionid)) {
error ("Workshop_print_assessment: Submission record not found");
}
- echo workshop_print_submission_title($workshop, $submission);
+ echo workshop_print_submission($workshop, $submission);
echo "</td></tr></table><br clear=\"all\" />\n";
// see if this is a pre-filled assessment for a re-submission...
if (!$course = get_record("course", "id", $workshop->course)) {
error("Print key: course not found");
}
- echo "<table align=\"center\">\n";
- echo "<tr><td><small>{}</small></td><td><small>".get_string("assessmentby", "workshop", $course->student).
- "; </small></td>\n";
- echo "<td><small>[]</small></td><td><small>".get_string("assessmentby", "workshop", $course->teacher).
- "; </small></td>\n";
- echo "<td><small><></small></td><td><small>".get_string("assessmentdropped", "workshop").
- "; </small></td>\n";
- echo "<td><small>()</small></td><td><small>".get_string("gradegiventoassessment", "workshop").
- ".</small></td></tr>\n";
- echo "<tr><td colspan=\"8\" align=\"center\"><small>".get_string("gradesforsubmissionsare", "workshop", $workshop->grade)."; ".
- get_string("gradesforassessmentsare", "workshop", $workshop->gradinggrade).".</small></td></tr>\n";
- echo "</table><br />\n";
+ echo "<div align=\"center\">\n";
+ echo "<p><small>{} ".get_string("assessmentby", "workshop", $course->student)."; \n";
+ echo "[] ".get_string("assessmentby", "workshop", $course->teacher)."; \n";
+ echo "<> ".get_string("assessmentdropped", "workshop").";\n";
+ if ($workshop->agreeassessments) echo "<<>> ".get_string("assessmentnotyetagreed", "workshop").";\n";
+ echo "<br />() ".get_string("gradegiventoassessment", "workshop")."; \n";
+ echo "(()) ".get_string("assessmentnotyetgraded", "workshop").".\n";
+ echo "<br />".get_string("gradesforsubmissionsare", "workshop", $workshop->grade)."; \n";
+ echo get_string("gradesforassessmentsare", "workshop", $workshop->gradinggrade).".</small></p>\n";
+ echo "</div>\n";
return;
}
}
+//////////////////////////////////////////////////////////////////////////////////////
+function workshop_print_submission($workshop, $submission) {
+ // prints the submission with optional attachments
+ global $CFG;
+
+ if (! $cm = get_coursemodule_from_instance("workshop", $workshop->id, $workshop->course)) {
+ error("Course Module ID was incorrect");
+ }
+ print_simple_box(format_text($submission->description), 'center');
+ if ($workshop->nattachments) {
+ $n = 1;
+ echo "<table align=\"center\">\n";
+ $filearea = workshop_file_area_name($workshop, $submission);
+ if ($basedir = workshop_file_area($workshop, $submission)) {
+ if ($files = get_directory_list($basedir)) {
+ foreach ($files as $file) {
+ $icon = mimeinfo("icon", $file);
+ if ($CFG->slasharguments) {
+ $ffurl = "file.php/$filearea/$file";
+ } else {
+ $ffurl = "file.php?file=/$filearea/$file";
+ }
+ echo "<tr><td><b>".get_string("attachment", "workshop")." $n:</b> \n";
+ echo "<img src=\"$CFG->pixpath/f/$icon\" height=\"16\" width=\"16\"
+ border=\"0\" alt=\"File\" />".
+ " <a target=\"uploadedfile\" href=\"$CFG->wwwroot/$ffurl\">$file</a></td></tr>";
+ $n++;
+ }
+ }
+ }
+ echo "</table>\n";
+ }
+ return;
+}
+
+
//////////////////////////////////////////////////////////////////////////////////////
function workshop_print_submission_assessments($workshop, $submission, $type) {
// Returns the teacher or peer grade and a hyperlinked list of grades for this submission
$str .= "<".number_format($assessment->grade, 0)." (0)></a> ";
}
} else {
- $str .= "[".number_format($assessment->grade, 0)." (-)]</a> ";
+ $str .= "[".number_format($assessment->grade, 0)." ((".
+ number_format($assessment->gradinggrade * $workshop->gradinggrade / 100, 0).
+ "))]</a> ";
}
}
}
foreach ($assessments as $assessment) {
if (isstudent($workshop->course, $assessment->userid)) {
$str .= "<a href=\"assessments.php?action=viewassessment&id=$cm->id&aid=$assessment->id\">";
- if ($assessment->timegraded) {
+ if ($workshop->agreeassessments and !$assessment->timeagreed and
+ isstudent($workshop->course, $submission->userid)) { // agreement on student work only
+ $str .= "<<".number_format($assessment->grade * $workshop->grade / 100, 0)." (".
+ number_format($assessment->gradinggrade * $workshop->gradinggrade / 100, 0).
+ ")>></a> ";
+ } elseif ($assessment->timegraded) {
if ($assessment->gradinggrade) {
$str .= "{".number_format($assessment->grade * $workshop->grade / 100, 0)." (".
number_format($assessment->gradinggrade * $workshop->gradinggrade / 100, 0).
" (0)></a> ";
}
} else {
- $str .= "{".number_format($assessment->grade * $workshop->grade / 100, 0)." (-)}</a> ";
+ $str .= "{".number_format($assessment->grade * $workshop->grade / 100, 0)." ((".
+ number_format($assessment->gradinggrade * $workshop->gradinggrade / 100, 0)."))}</a> ";
}
}
}
function workshop_print_submission_title($workshop, $submission) {
// Arguments are objects
- global $CFG;
+ if (! $cm = get_coursemodule_from_instance("workshop", $workshop->id, $workshop->course)) {
+ error("Course Module ID was incorrect");
+ }
if (!$submission->timecreated) { // a "no submission"
return $submission->title;
}
-
- require_once("$CFG->dirroot/files/mimetypes.php");
- $filearea = workshop_file_area_name($workshop, $submission);
- if ($basedir = workshop_file_area($workshop, $submission)) {
- if (list($file) = get_directory_list($basedir)) {
- $icon = mimeinfo("icon", $file);
- if ($CFG->slasharguments) {
- $ffurl = "file.php/$filearea/$file";
- } else {
- $ffurl = "file.php?file=/$filearea/$file";
- }
- return "<img src=\"$CFG->pixpath/f/$icon\" height=\"16\" width=\"16\" border=\"0\" alt=\"File\" />".
- " <a target=\"uploadedfile$submission->id\" href=\"$CFG->wwwroot/$ffurl\">$submission->title</a>";
- }
- }
+ return "<a href=\"submissions.php?id=$cm->id&action=showsubmission&sid=$submission->id\">$submission->title</a>";
}
//////////////////////////////////////////////////////////////////////////////////////
function workshop_print_upload_form($workshop) {
-// Arguments are objects, needs title coming in
-
global $CFG;
if (! $course = get_record("course", "id", $workshop->course)) {
if (! $cm = get_coursemodule_from_instance("workshop", $workshop->id, $course->id)) {
error("Course Module ID was incorrect");
}
+ $usehtmleditor = can_use_html_editor();
echo "<div align=\"center\">";
echo "<form enctype=\"multipart/form-data\" method=\"POST\" action=\"upload.php\">";
echo " <input type=\"hidden\" name=\"id\" value=\"$cm->id\" />";
- require_once($CFG->dirroot.'/lib/uploadlib.php');
- upload_print_form_fragment(1,array('newfile'),null,true,array('title'),$course->maxbytes,$workshop->maxbytes,false);
- echo " <input type=\"submit\" name=\"save\" value=\"".get_string("uploadthisfile")."\" />";
+ echo "<table celpadding=\"5\" border=\"1\" align=\"center\">\n";
+ // now get the submission
+ echo "<tr valign=\"top\"><td><b>". get_string("title", "workshop").":</b>\n";
+ echo "<input type=\"text\" name=\"title\" size=\"60\" maxlength=\"100\" value=\"\" />\n";
+ echo "</td></tr><tr><td><b>".get_string("submission", "workshop").":</b><br />\n";
+ print_textarea($usehtmleditor, 25,70, 630, 400, "description");
+ use_html_editor("description");
+ echo "</td></tr><tr><td>\n";
+ if ($workshop->nattachments) {
+ require_once($CFG->dirroot.'/lib/uploadlib.php');
+ for ($i=0; $i < $workshop->nattachments; $i++) {
+ $iplus1 = $i + 1;
+ $tag[$i] = get_string("attachment", "workshop")." $iplus1:";
+ }
+ upload_print_form_fragment($workshop->nattachments,null,$tag,false,null,$course->maxbytes,
+ $workshop->maxbytes,false);
+ }
+ echo "</td></tr></table>\n";
+ echo " <input type=\"submit\" name=\"save\" value=\"".get_string("submitassignment","workshop")."\" />";
echo "</form>";
echo "</div>";
}
if (!isset($form->nelements)) {
$form->nelements = 1;
}
+ if (!isset($form->nattachments)) {
+ $form->nattachments = 0;
+ }
if (empty($form->resubmit)) {
$form->resubmit = "";
}
</td>
</tr>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("numberofattachments", "workshop") ?>:</b></p></td>
+ <td valign="middle">
+ <?php
+ unset($numbers);
+ for ($i=5; $i>=0; $i--) {
+ $numbers[$i] = $i;
+ }
+ choose_from_menu($numbers, "nattachments", "$form->nattachments", "");
+ helpbutton("nattachments", get_string("numberofaattachments", "workshop"), "workshop");
+ ?>
+ </td>
+</tr>
+
<tr>
<td align="right"><p><b><?php print_string("allowresubmit", "workshop") ?>:</b></p></td>
<td>
$workshop->name = backup_todb($info['MOD']['#']['NAME']['0']['#']);
$workshop->description = backup_todb($info['MOD']['#']['DESCRIPTION']['0']['#']);
$workshop->nelements = backup_todb($info['MOD']['#']['NELEMENTS']['0']['#']);
+ $workshop->nattachments = backup_todb($info['MOD']['#']['NATTACHMENTS']['0']['#']);
$workshop->phase = backup_todb($info['MOD']['#']['PHASE']['0']['#']);
$workshop->format = backup_todb($info['MOD']['#']['FORMAT']['0']['#']);
$workshop->gradingstrategy = backup_todb($info['MOD']['#']['GRADINGSTRATEGY']['0']['#']);
$submission->title = backup_todb($sub_info['#']['TITLE']['0']['#']);
$submission->timecreated = backup_todb($sub_info['#']['TIMECREATED']['0']['#']);
$submission->mailed = backup_todb($sub_info['#']['MAILED']['0']['#']);
+ $submission->description = backup_todb($sub_info['#']['DESCRIPTION']['0']['#']);
$submission->teachergrade = backup_todb($sub_info['#']['TEACHERGRADE']['0']['#']);
$submission->peergrade = backup_todb($sub_info['#']['PEERGRADE']['0']['#']);
$submission->biasgrade = backup_todb($sub_info['#']['BIASGRADE']['0']['#']);
/*************************************************
ACTIONS handled are:
- adminamendtitle
+ dminamendtitle
adminconfirmdelete
admindelete
adminlist
displayfinalgrades (teachers only)
+ editsubmission
listallsubmissions
listforassessmentstudent
listforassessmentteacher
+ showsubmission
+ updatesubmission
userconfirmdelete
userdelete
}
- /******************* admin amend title ************************************/
- if ($action == 'adminamendtitle' ) {
+/******************* admin amend title ************************************/
+ elseif ($action == 'adminamendtitle' ) {
if (!isteacher($course->id)) {
error("Only teachers can look at this page");
echo "<p>".get_string("namesnotshowntostudents", "workshop", $course->students)."</p>\n";
}
}
- echo "<p>".get_string("allgradeshaveamaximumof", "workshop", $workshop->grade)."</p>\n";
print_continue("view.php?id=$cm->id");
}
+ /******************* edit submission ************************************/
+ elseif ($action == 'editsubmission' ) {
+
+ if (empty($_GET['sid'])) {
+ error("Edit submission: submission id missing");
+ }
+ $usehtmleditor = can_use_html_editor();
+
+ $submission = get_record("workshop_submissions", "id", $_GET['sid']);
+ print_heading(get_string("editsubmission", "workshop"));
+ if ($submission->userid <> $USER->id) {
+ error("Edit submission: Userids do not match");
+ }
+ ?>
+ <form name="editform" enctype="multipart/form-data" action="submissions.php" method="post">
+ <input type="hidden" name="action" value="updatesubmission" />
+ <input type="hidden" name="id" value="<?php echo $cm->id ?>" />
+ <input type="hidden" name="sid" value="<?php echo $_GET['sid'] ?>" />
+ <center>
+ <table celpadding="5" border="1">
+ <?php
+ echo "<tr valign=\"top\"><td><b>". get_string("title", "workshop").":</b>\n";
+ echo "<input type=\"text\" name=\"title\" size=\"60\" maxlength=\"100\" value=\"$submission->title\" />\n";
+ echo "</td></tr><tr><td><b>".get_string("submission", "workshop").":</b><br />\n";
+ print_textarea($usehtmleditor, 25,70, 630, 400, "description", $submission->description);
+ use_html_editor("description");
+ echo "</td></tr>\n";
+ if ($workshop->nattachments) {
+ $filearea = workshop_file_area_name($workshop, $submission);
+ if ($basedir = workshop_file_area($workshop, $submission)) {
+ if ($files = get_directory_list($basedir)) {
+ echo "<tr><td><b>".get_string("attachments", "workshop").
+ "</b><div align=\"right\"><input type=\"button\" value=\"".get_string("removeallattachments",
+ "workshop")."\" onclick=\"document.editform.action.value='removeattachments';
+ document.editform.submit();\"/></div></td></tr>\n";
+ $n = 1;
+ foreach ($files as $file) {
+ $icon = mimeinfo("icon", $file);
+ if ($CFG->slasharguments) {
+ $ffurl = "file.php/$filearea/$file";
+ } else {
+ $ffurl = "file.php?file=/$filearea/$file";
+ }
+ echo "<tr><td>".get_string("attachment", "workshop")." $n: <img src=\"$CFG->pixpath/f/$icon\"
+ height=\"16\" width=\"16\" border=\"0\" alt=\"File\" />".
+ " <a target=\"uploadedfile\" href=\"$CFG->wwwroot/$ffurl\">$file</a></td></tr>\n";
+ }
+ } else {
+ echo "<tr><td><b>".get_string("noattachments", "workshop")."</b></td></tr>\n";
+ }
+ }
+ echo "<tr><td>\n";
+ require_once($CFG->dirroot.'/lib/uploadlib.php');
+ for ($i=0; $i < $workshop->nattachments; $i++) {
+ $iplus1 = $i + 1;
+ $tag[$i] = get_string("newattachment", "workshop")." $iplus1:";
+ }
+ upload_print_form_fragment($workshop->nattachments,null,$tag,false,null,$course->maxbytes,
+ $workshop->maxbytes,false);
+ echo "</td></tr>\n";
+ }
+
+ echo "</table>\n";
+ echo "<input type=\"submit\" value=\"".get_string("savemysubmission", "workshop")."\" />\n";
+ echo "</center></form>\n";
+ }
+
+
/******************* list all submissions ************************************/
elseif ($action == 'listallsubmissions' ) {
if (!$users = get_course_students($course->id)) {
}
+ /******************* show submission ************************************/
+ elseif ($action == 'showsubmission' ) {
+
+ if (empty($_GET['sid'])) {
+ error("Edit submission: submission id missing");
+ }
+
+ $submission = get_record("workshop_submissions", "id", $_GET['sid']);
+ workshop_print_submission($workshop, $submission);
+ print_continue("view.php?id=$cm->id");
+ }
+
+
/*************** update (league table options teacher) ***************************/
elseif ($action == 'updateleaguetable') {
}
- /******************* user confirm delete ************************************/
+ /*************** update submission ***************************/
+ elseif ($action == 'updatesubmission') {
+
+ $timenow = time();
+ $form = data_submitted();
+
+ if (empty($form->sid)) {
+ error("Update submission: submission id missing");
+ }
+ $submission = get_record("workshop_submissions", "id", $form->sid);
+ // check existence of title
+ if (empty($form->title)) {
+ $title = get_string("notitle", "workshop");
+ }
+ set_field("workshop_submissions", "title", $form->title, "id", $submission->id);
+ set_field("workshop_submissions", "description", trim($form->description), "id", $submission->id);
+ set_field("workshop_submissions", "timecreated", $timenow, "id", $submission->id);
+ if ($workshop->nattachments) {
+ require_once($CFG->dirroot.'/lib/uploadlib.php');
+ $um = new upload_manager(null,false,false,$course,false,$workshop->maxbytes);
+ if ($um->preprocess_files()) {
+ $dir = workshop_file_area_name($workshop, $submission);
+ if ($um->save_files($dir)) {
+ add_to_log($course->id, "workshop", "newattachment", "view.php?id=$cm->id", "$workshop->id");
+ print_heading(get_string("uploadsuccess", "workshop"));
+ }
+ // upload manager will print errors.
+ }
+ print_continue("view.php?id=$cm->id");
+ } else {
+ redirect("view.php?id=$cm->id");
+ }
+ }
+
+ /******************* user confirm delete ************************************/
elseif ($action == 'userconfirmdelete' ) {
if (empty($_GET['sid'])) {
require_login($course->id);
$strworkshops = get_string("modulenameplural", "workshop");
- $strworkshop = get_string("modulename", "workshop");
- $strupload = get_string("upload");
+ $strworkshop = get_string("modulename", "workshop");
+ $strupload = get_string("upload");
print_header_simple("$workshop->name : $strupload", "",
"<a href=\"index.php?id=$course->id\">$strworkshops</a> ->
<a href=\"view.php?a=$workshop->id\">$workshop->name</a> -> $strupload",
"", "", true);
- /****
- if ($submissions = workshop_get_submissions($workshop, $USER)) {
- if ($submission->grade and !$workshop->resubmit) {
- error("You've already been graded - there's no point in uploading anything");
- }
- }
-****/
$timenow = time();
- if (!$title = $_POST['title']) {
- notify(get_string("notitlegiven", "workshop") );
+
+ $form = data_submitted("nomatch"); // POST may come from two forms
+
+ // don't be picky about not having a title
+ if (!$title = $form->title) {
+ $title = get_string("notitle", "workshop");
}
- else {
- require_once($CFG->dirroot.'/lib/uploadlib.php');
- $um = new upload_manager('newfile',false,false,$course,false,$exercise->maxbytes);
- if ($um->preprocess_files()) {
- // get the current set of submissions
- $submissions = workshop_get_user_submissions($workshop, $USER);
- // add new submission record
- $newsubmission->workshopid = $workshop->id;
- $newsubmission->userid = $USER->id;
- $newsubmission->title = $title;
- $newsubmission->timecreated = time();
- if (!$newsubmission->id = insert_record("workshop_submissions", $newsubmission)) {
- error("Workshop upload: Failure to create new submission record!");
- }
- // see if this is a resubmission by looking at the previous submissions...
- if ($submissions and ($workshop->phase >1)) { // ...but not teacher submissions
- // find the last submission
- foreach ($submissions as $submission) {
- $lastsubmission = $submission;
- break;
- }
- // find all the possible assessments of this submission
- // ...and if they have been assessed give the assessor a new assessment
- // based on their old assessment, if the assessment has not be made
- // just delete it!
- if ($assessments = workshop_get_assessments($submission, 'ALL')) {
- foreach ($assessments as $assessment) {
- if ($assessment->timecreated < $timenow) {
- // a Cold or Warm assessment - copy it with feedback..
- $newassessment = workshop_copy_assessment($assessment, $newsubmission,
- true);
- // set the resubmission flag so student can be emailed/told about
- // this assessment
- set_field("workshop_assessments", "resubmission", 1, "id",
- $newassessment->id);
- } else {
- // a hot assessment, was not used, just dump it
- delete_records("workshop_assessments", "id", $assessment->id);
- }
+
+ // get the current set of submissions
+ $submissions = workshop_get_user_submissions($workshop, $USER);
+ // add new submission record
+ $newsubmission->workshopid = $workshop->id;
+ $newsubmission->userid = $USER->id;
+ $newsubmission->title = $title;
+ $newsubmission->description = trim($form->description);
+ $newsubmission->timecreated = time();
+ if (!$newsubmission->id = insert_record("workshop_submissions", $newsubmission)) {
+ error("Workshop upload: Failure to create new submission record!");
+ }
+ // see if this is a resubmission by looking at the previous submissions...
+ if ($submissions and ($workshop->phase >1)) { // ...but not teacher submissions
+ // find the last submission
+ foreach ($submissions as $submission) {
+ $lastsubmission = $submission;
+ break;
+ }
+ // find all the possible assessments of this submission
+ // ...and if they have been assessed give the assessor a new assessment
+ // based on their old assessment, if the assessment has not be made
+ // just delete it!
+ if ($assessments = workshop_get_assessments($submission, 'ALL')) {
+ foreach ($assessments as $assessment) {
+ if ($assessment->timecreated < $timenow) {
+ // a Cold or Warm assessment...
+ if ($assessment->userid <> $USER->id) {
+ // only copy other students assessment not the self assessment (if present)
+ // copy it with feedback..
+ $newassessment = workshop_copy_assessment($assessment, $newsubmission, true);
+ // set the resubmission flag so student can be emailed/told about
+ // this assessment
+ set_field("workshop_assessments", "resubmission", 1, "id", $newassessment->id);
}
+ } else {
+ // a hot assessment, was not used, just dump it
+ delete_records("workshop_assessments", "id", $assessment->id);
}
- add_to_log($course->id, "workshop", "resubmit", "view.php?id=$cm->id",
- "$workshop->id","$cm->id");
}
+ }
+ add_to_log($course->id, "workshop", "resubmit", "view.php?id=$cm->id", "$workshop->id","$cm->id");
+ }
+ // do something about the attachments, if there are any
+ if ($workshop->nattachments) {
+ require_once($CFG->dirroot.'/lib/uploadlib.php');
+ $um = new upload_manager(null,false,false,$course,false,$workshop->maxbytes);
+ if ($um->preprocess_files()) {
$dir = workshop_file_area_name($workshop, $newsubmission);
if ($um->save_files($dir)) {
- print_heading(get_string("uploadsuccess", "assignment", $um->get_new_filename()) );
- add_to_log($course->id, "workshop", "submit", "view.php?id=$cm->id", "$workshop->id", "$cm->id");
+ print_heading(get_string("uploadsuccess", "workshop"));
}
- // um will take care of printing errors.
+ // um will take care of printing errors.
}
- }
+ }
+ if (!$workshop->nattachments) {
+ print_heading(get_string("submitted", "workshop")." ".get_string("ok"));
+ }
+ add_to_log($course->id, "workshop", "submit", "view.php?id=$cm->id", "$workshop->id", "$cm->id");
print_continue("view.php?id=$cm->id");
-
print_footer($course);
?>
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2004091700;
+$module->version = 2004092400;
$module->requires = 2004091700; // Requires this Moodle version
$module->cron = 60;
workshop_list_user_submissions($workshop, $USER);
// are resubmissions allowed and the workshop is in submission phases (2 and 3)?
if ($workshop->resubmit and ($workshop->phase < 4)) {
- // see if there are any cold (warm included as well) assessments of the last submission
+ // see if there are any cold assessments of the last submission
// if there are then print upload form
if ($submissions = workshop_get_user_submissions($workshop, $USER)) {
foreach ($submissions as $submission) {
$lastsubmission = $submission;
break;
}
- if (workshop_count_assessments($lastsubmission)) {
+ $n = 0; // number of cold assessments (not include self assessments)
+ if ($assessments = workshop_get_assessments($lastsubmission)) {
+ foreach ($assessments as $assessment) {
+ if ($assessment->userid <> $USER->id) {
+ $n++;
+ }
+ }
+ }
+ if ($n) {
echo "<hr size=\"1\" noshade=\"noshade\" />";
print_heading(get_string("submitrevisedassignment", "workshop").":");
workshop_print_upload_form($workshop);
}
}
}
- // allow user to list their submissions and assessments in a general way????
- // print_heading("<a href=\"submissions.php?action=listallsubmissions&id=$cm->id\">".
- // get_string("listofallsubmissions", "workshop"));
}
}
}