--- ../../moodle-194/mod/assignment/type/upload/assignment.class.php 2008-10-09 17:19:45.000000000 -0700 +++ mod/assignment/type/upload/assignment.class.php 2009-03-10 14:47:25.000000000 -0700 @@ -1,4 +1,4 @@ -libdir.'/formslib.php'); define('ASSIGNMENT_STATUS_SUBMITTED', 'submitted'); // student thinks it is finished @@ -95,10 +95,14 @@ if ($grade->hidden or $grade->grade === false) { // hidden or error return; } - - if ($grade->grade === null and empty($grade->str_feedback)) { /// Nothing to show yet + + // MOD -- Check if a teacher has uploaded any files + $files = $this->print_responsefiles($USER->id, true, false); + if ($grade->grade === null and empty($grade->str_feedback) and empty($files)) { /// Nothing to show yet + //if ($grade->grade === null and empty($grade->str_feedback)) { /// Nothing to show yet return; } + // End MOD $graded_date = $grade->dategraded; $graded_by = $grade->usermodified; @@ -394,8 +398,11 @@ } echo $output; } - - function print_responsefiles($userid, $return=false) { + + // MOD -- Add param to only return an empty string if there are no files + //function print_responsefiles($userid, $return=false) { + function print_responsefiles($userid, $return=false, $wraponempty=true) { + // End MOD global $CFG, $USER; $mode = optional_param('mode', '', PARAM_ALPHA); @@ -432,8 +439,14 @@ } } - - $output = '