Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit b5b7d9d91acf45e8519375378992e3bac7946ddf 1 parent 2cbdaa7
@sunner sunner authored dmonllao committed
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');
Please sign in to comment.
Something went wrong with that request. Please try again.