Skip to content
Browse files

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

… available
  • Loading branch information...
1 parent 9e4b400 commit 5458ff4d23fa886c6b995b77bf74e3145261b367 @bostelm bostelm committed Aug 20, 2011
Showing with 6 additions and 6 deletions.
  1. +6 −6 mod/assignment/type/upload/assignment.class.php
View
12 mod/assignment/type/upload/assignment.class.php
@@ -110,11 +110,6 @@ function view_feedback($submission=NULL) {
}
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 @@ 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 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;
}

0 comments on commit 5458ff4

Please sign in to comment.
Something went wrong with that request. Please try again.