MDL-38254 Assignment Module: add avaialble message to all assignment types
[moodle.git] / mod / assignment / type / uploadsingle / assignment.class.php
index 039071c..7f399e7 100644 (file)
@@ -85,8 +85,12 @@ class assignment_uploadsingle extends assignment_base {
             }
         }
 
-        if (is_enrolled($this->context, $USER, 'mod/assignment:submit') && $this->isopen() && (!$filecount || $this->assignment->resubmit || !$submission->timemarked)) {
-            $this->view_upload_form();
+        if (is_enrolled($this->context, $USER, 'mod/assignment:submit') && (!$filecount || $this->assignment->resubmit || !$submission->timemarked)) {
+            if ($this->isopen()) {
+                $this->view_upload_form();
+            } else if ($this->assignment->timeavailable > time()) {
+                echo $OUTPUT->heading(get_string('futureaassignment','assignment'), 3);
+            }
         }
 
         $this->view_footer();