Skip to content
Browse files

MDL-28155 mod_assignment - Fix an ugly hack

Show download all link for any assignment types which implement
the download_submissions() method
  • Loading branch information...
1 parent 1494f20 commit 7073fa4c4af8fdd5c68866f156a9f8c031f7f5a2 @sunner sunner committed with dmonllao Jul 2, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/assignment/lib.php
View
2 mod/assignment/lib.php
@@ -1591,7 +1591,7 @@ function display_submissions($message='') {
}
$currentposition++;
}
- if ($hassubmission && ($this->assignment->assignmenttype=='upload' || $this->assignment->assignmenttype=='online' || $this->assignment->assignmenttype=='uploadsingle')) { //TODO: this is an ugly hack, where is the plugin spirit? (skodak)
+ if ($hassubmission && method_exists('assignment_'.$this->assignment->assignmenttype, 'download_submissions')) {
echo html_writer::start_tag('div', array('class' => 'mod-assignment-download-link'));
echo html_writer::link(new moodle_url('/mod/assignment/submissions.php', array('id' => $this->cm->id, 'download' => 'zip')), get_string('downloadall', 'assignment'));
echo html_writer::end_tag('div');

0 comments on commit 7073fa4

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