From db3543428f17e972b15d097efa082c0367249fd9 Mon Sep 17 00:00:00 2001 From: Henning Bostelmann Date: Sat, 20 Aug 2011 20:17:44 +0100 Subject: [PATCH] MDL-16553 Assignment, student view: show response files when no grade available --- mod/assignment/type/upload/assignment.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mod/assignment/type/upload/assignment.class.php b/mod/assignment/type/upload/assignment.class.php index 3cbcc2f3800..b909f25a407 100644 --- a/mod/assignment/type/upload/assignment.class.php +++ b/mod/assignment/type/upload/assignment.class.php @@ -110,11 +110,6 @@ class assignment_upload extends assignment_base { } if (empty($submission->timemarked)) { /// Nothing to show, so print nothing - if ($this->count_responsefiles($USER->id)) { - echo $OUTPUT->heading(get_string('responsefiles', 'assignment'), 3); - $responsefiles = $this->print_responsefiles($USER->id, true); - echo $OUTPUT->box($responsefiles, 'generalbox boxaligncenter'); - } return; } @@ -126,7 +121,12 @@ class assignment_upload extends assignment_base { return; } - if ($grade->grade === null and empty($grade->str_feedback)) { /// Nothing to show yet + if ($grade->grade === null and empty($grade->str_feedback)) { // No grade to show yet + if ($this->count_responsefiles($USER->id)) { // but possibly response files are present + echo $OUTPUT->heading(get_string('responsefiles', 'assignment'), 3); + $responsefiles = $this->print_responsefiles($USER->id, true); + echo $OUTPUT->box($responsefiles, 'generalbox boxaligncenter'); + } return; } -- 2.11.4.GIT