MDL-35910 Assignment 2.2: Fixed included files in assignment zip.
authorRajesh Taneja <rajesh@moodle.com>
Fri, 19 Oct 2012 08:07:05 +0000 (16:07 +0800)
committerRajesh Taneja <rajesh@moodle.com>
Fri, 19 Oct 2012 08:09:52 +0000 (16:09 +0800)
If Marking button is enabled, assignment is open and is not finalized, then don't add file to zip

mod/assignment/type/upload/assignment.class.php

index 91c5f5f..8ca17bd 100644 (file)
@@ -1164,9 +1164,9 @@ class assignment_upload extends assignment_base {
         }
         $filename = str_replace(' ', '_', clean_filename($this->course->shortname.'-'.$this->assignment->name.'-'.$groupname.$this->assignment->id.".zip")); //name of new zip file.
         foreach ($submissions as $submission) {
-            // If assignment is open and submission is not finalized then don't add it to zip.
+            // If assignment is open and submission is not finalized and marking button enabled then don't add it to zip.
             $submissionstatus = $this->is_finalized($submission);
-            if ($this->isopen() && empty($submissionstatus)) {
+            if ($this->isopen() && empty($submissionstatus) && !empty($this->assignment->var4)) {
                 continue;
             }
             $a_userid = $submission->userid; //get userid