Permalink
Browse files

MDL-16553 Assignment, student view: show response files when no grade…

… available
  • Loading branch information...
1 parent e9e2def commit b9625c16b66121eef11f27010f6f5b39461fe4a6 @bostelm bostelm committed Aug 20, 2011
Showing with 6 additions and 6 deletions.
  1. +6 −6 mod/assignment/type/upload/assignment.class.php
@@ -80,11 +80,6 @@ function view_feedback($submission=NULL) {
}
if (empty($submission->timemarked)) { /// Nothing to show, so print nothing
- if ($this->count_responsefiles($USER->id)) {
- print_heading(get_string('responsefiles', 'assignment', $this->course->teacher), '', 3);
- $responsefiles = $this->print_responsefiles($USER->id, true);
- print_simple_box($responsefiles, 'center');
- }
return;
}
@@ -96,7 +91,12 @@ function view_feedback($submission=NULL) {
return;
}
- if ($grade->grade === null and empty($grade->str_feedback)) { /// Nothing to show yet
+ if ($grade->grade === null and empty($grade->str_feedback)) { // No grades to show yet
+ if ($this->count_responsefiles($USER->id)) { // but possibly response files to show
+ print_heading(get_string('responsefiles', 'assignment', $this->course->teacher), '', 3);
+ $responsefiles = $this->print_responsefiles($USER->id, true);
+ print_simple_box($responsefiles, 'center');
+ }
return;
}

0 comments on commit b9625c1

Please sign in to comment.