]> git.mjollnir.org Git - moodle.git/commitdiff
partially fixed - assignment intro always avaible even setting available date MDL...
authorskodak <skodak>
Sun, 1 Oct 2006 21:35:16 +0000 (21:35 +0000)
committerskodak <skodak>
Sun, 1 Oct 2006 21:35:16 +0000 (21:35 +0000)
lang/en_utf8/assignment.php
mod/assignment/type/upload/assignment.class.php

index fec4bb6fb4e7edbf3cfe835747efd84ae5f526fb..b3ee042331f9b6e76bb4b647e78c6e1c2006a24a 100644 (file)
@@ -84,6 +84,7 @@ $string['noattempts'] = 'No attempts have been made on this assignment';
 $string['nofilesyet'] = 'No files submitted yet';
 $string['nofiles'] = 'No files were submitted';
 $string['notes'] = 'Notes';
+$string['notavailableyet'] = 'Sorry, this assignment is not yet available.<br />Assignment instructions will be displayed here on the date given bellow.';
 $string['notesempty'] = 'No entry';
 $string['notesupdateerror'] = 'Error when updating notes';
 $string['notgradedyet'] = 'Not graded yet';
index a28e8280e804df2e9eaaa5c81b7c1c6cd8a1bd72..e1d284cda3dd4328a8d113e8040b7b3b5daf34b6 100644 (file)
@@ -21,7 +21,17 @@ class assignment_upload extends assignment_base {
         add_to_log($this->course->id, 'assignment', 'view', "view.php?id={$this->cm->id}", $this->assignment->id, $this->cm->id);
 
         $this->view_header();
-        $this->view_intro();
+
+        if ($this->assignment->timeavailable > time()
+          and !has_capability('mod/assignment:grade', $this->context)) {
+            //not open yet === no instructions
+            print_simple_box_start('center', '', '', '', 'generalbox', 'intro');
+            print_string('notavailableyet', 'assignment');
+            print_simple_box_end();
+        } else {
+            $this->view_intro();
+        }
+
         $this->view_dates();
 
         if (has_capability('mod/assignment:submit', $this->context)) {