assignment MDL-22893 file count limit is now controlled by the files api options...
authorAparup Banerjee <nebgor@gmail.com>
Thu, 29 Jul 2010 08:46:02 +0000 (08:46 +0000)
committerAparup Banerjee <nebgor@gmail.com>
Thu, 29 Jul 2010 08:46:02 +0000 (08:46 +0000)
mod/assignment/type/upload/assignment.class.php

index eabfb94..a5d16d3 100644 (file)
@@ -901,7 +901,7 @@ class assignment_upload extends assignment_base {
         if (is_enrolled($this->context, $USER, 'mod/assignment:submit')
           and $this->isopen()                                                 // assignment not closed yet
           and (empty($submission) or ($submission->userid == $USER->id        // his/her own submission
-            and $this->count_user_files($submission->id) < $this->assignment->var1))    // file limit not reached
+            and $this->count_user_files($submission->id) <= $this->assignment->var1))    // file limit not exceeded
           and !$this->is_finalized($submission)) {                            // no uploading after final submission
             return true;
         } else {