Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-30481 Advanced upload assignment: Fixed assignment available date…

… string to appropriately identify past or future availability
  • Loading branch information...
commit 6fe4e3c02bf8b2e93adc67cb1229675874b49aae 1 parent a09484c
rwijaya authored February 26, 2013
2  mod/assignment/lang/en/assignment.php
@@ -57,6 +57,7 @@
57 57
 $string['cannotdeletefiles'] = 'An error occurred and files could not be deleted';
58 58
 $string['cannotviewassignment'] = 'You can not view this assignment';
59 59
 $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.';
  60
+$string['closedassignment'] = 'The submission date for this assignment has been closed.';
60 61
 $string['comment'] = 'Comment';
61 62
 $string['commentinline'] = 'Comment inline';
62 63
 $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 @@
104 105
 $string['feedbackupdated'] = 'Submissions feedback updated for {$a} people';
105 106
 $string['finalize'] = 'Prevent submission updates';
106 107
 $string['finalizeerror'] = 'An error occurred and that submission could not be finalised';
  108
+$string['futureaassignment'] = 'This assignment is not yet available.';
107 109
 $string['graded'] = 'Graded';
108 110
 $string['guestnosubmit'] = 'Sorry, guests are not allowed to submit an assignment. You have to log in/ register before you can submit your answer.';
109 111
 $string['guestnoupload'] = 'Sorry, guests are not allowed to upload';
7  mod/assignment/type/upload/assignment.class.php
@@ -256,8 +256,11 @@ function view_final_submission() {
256 256
             echo '</form>';
257 257
             echo '</div>';
258 258
         } else if (!$this->isopen()) {
259  
-            echo $OUTPUT->heading(get_string('nomoresubmissions','assignment'), 3);
260  
-
  259
+            if ($this->assignment->timeavailable < time()) {
  260
+                echo $OUTPUT->heading(get_string('closedassignment','assignment'), 3);
  261
+            } else {
  262
+                echo $OUTPUT->heading(get_string('futureaassignment','assignment'), 3);
  263
+            }
261 264
         } else if ($this->drafts_tracked() and $state = $this->is_finalized($submission)) {
262 265
             if ($state == ASSIGNMENT_STATUS_SUBMITTED) {
263 266
                 echo $OUTPUT->heading(get_string('submitedformarking','assignment'), 3);

0 notes on commit 6fe4e3c

Please sign in to comment.
Something went wrong with that request. Please try again.