MDL-28155 mod_assignment Using the this object instead of a string
authorDavid Monllao <davidm@moodle.com>
Wed, 11 Jul 2012 07:10:17 +0000 (15:10 +0800)
committerDavid Monllao <davidm@moodle.com>
Wed, 11 Jul 2012 07:13:34 +0000 (15:13 +0800)
mod/assignment/lib.php

index d7115e6..eea2714 100644 (file)
@@ -1591,7 +1591,7 @@ class assignment_base {
                     }
                     $currentposition++;
                 }
-                if ($hassubmission && method_exists('assignment_'.$this->assignment->assignmenttype, 'download_submissions')) {
+                if ($hassubmission && method_exists($this, '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');