Revert "MDL-38254 Assignment Module: add avaialble message to all assignment types"
authorDan Poltawski <dan@moodle.com>
Thu, 11 Apr 2013 08:52:25 +0000 (16:52 +0800)
committerDan Poltawski <dan@moodle.com>
Thu, 11 Apr 2013 08:52:25 +0000 (16:52 +0800)
mod/assignment/lib.php
mod/assignment/type/online/assignment.class.php
mod/assignment/type/uploadsingle/assignment.class.php

index 5d4d136..7bd8064 100644 (file)
@@ -165,12 +165,6 @@ class assignment_base {
 
         $this->view_dates();
 
-        if ($this->isopen() && $this->assignment->timedue > 0 && $this->assignment->timedue < time()) {
-            echo $OUTPUT->heading(get_string('closedassignment','assignment'), 3);
-        } else if ($this->assignment->timeavailable > time()) {
-            echo $OUTPUT->heading(get_string('futureaassignment','assignment'), 3);
-        }
-
         $this->view_feedback();
 
         $this->view_footer();
index 103a8dd..a917d31 100644 (file)
@@ -127,9 +127,7 @@ class assignment_online extends assignment_base {
                         $button->render();
                     }
                 } else if ($this->isopen()){    //fix for #4206
-                    echo $OUTPUT->heading(get_string('emptysubmission','assignment'), 3);
-                } else if ($this->assignment->timeavailable > time()) {
-                    echo $OUTPUT->heading(get_string('futureaassignment','assignment'), 3);
+                    echo '<div style="text-align:center">'.get_string('emptysubmission', 'assignment').'</div>';
                 }
             }
             echo $OUTPUT->box_end();
index 7f399e7..039071c 100644 (file)
@@ -85,12 +85,8 @@ class assignment_uploadsingle extends assignment_base {
             }
         }
 
-        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);
-            }
+        if (is_enrolled($this->context, $USER, 'mod/assignment:submit') && $this->isopen() && (!$filecount || $this->assignment->resubmit || !$submission->timemarked)) {
+            $this->view_upload_form();
         }
 
         $this->view_footer();