MDL-30481 Advanced upload assignment: Fixed assignment available date string to appro...
authorRossiani Wijaya <rwijaya@moodle.com>
Tue, 26 Feb 2013 09:38:55 +0000 (17:38 +0800)
committerRossiani Wijaya <rwijaya@moodle.com>
Tue, 26 Feb 2013 09:41:53 +0000 (17:41 +0800)
mod/assignment/lang/en/assignment.php
mod/assignment/type/upload/assignment.class.php

index 104f3ab..888f522 100644 (file)
@@ -57,6 +57,7 @@ $string['availabledate'] = 'Available from';
 $string['cannotdeletefiles'] = 'An error occurred and files could not be deleted';
 $string['cannotviewassignment'] = 'You can not view this assignment';
 $string['changegradewarning'] = 'This assignment has graded submissions and changing the grade will not automatically re-calculate existing submission grades. You must re-grade all existing submissions, if you wish to change the grade.';
+$string['closedassignment'] = 'The submission date for this assignment has been closed.';
 $string['comment'] = 'Comment';
 $string['commentinline'] = 'Comment inline';
 $string['commentinline_help'] = 'If enabled, the submission text will be copied into the feedback comment field during grading, making it easier to comment inline (using a different colour, perhaps) or to edit the original text.';
@@ -104,6 +105,7 @@ $string['feedbackfromteacher'] = 'Feedback from {$a}';
 $string['feedbackupdated'] = 'Submissions feedback updated for {$a} people';
 $string['finalize'] = 'Prevent submission updates';
 $string['finalizeerror'] = 'An error occurred and that submission could not be finalised';
+$string['futureaassignment'] = 'This assignment is not yet available.';
 $string['graded'] = 'Graded';
 $string['guestnosubmit'] = 'Sorry, guests are not allowed to submit an assignment. You have to log in/ register before you can submit your answer.';
 $string['guestnoupload'] = 'Sorry, guests are not allowed to upload';
index 8ca17bd..0dca4a8 100644 (file)
@@ -256,8 +256,11 @@ class assignment_upload extends assignment_base {
             echo '</form>';
             echo '</div>';
         } else if (!$this->isopen()) {
-            echo $OUTPUT->heading(get_string('nomoresubmissions','assignment'), 3);
-
+            if ($this->assignment->timeavailable < time()) {
+                echo $OUTPUT->heading(get_string('closedassignment','assignment'), 3);
+            } else {
+                echo $OUTPUT->heading(get_string('futureaassignment','assignment'), 3);
+            }
         } else if ($this->drafts_tracked() and $state = $this->is_finalized($submission)) {
             if ($state == ASSIGNMENT_STATUS_SUBMITTED) {
                 echo $OUTPUT->heading(get_string('submitedformarking','assignment'), 3);