partially fixed - assignment intro always avaible even setting available date MDL-6131

This commit is contained in:
skodak 2006-10-01 21:35:16 +00:00
parent cc08091300
commit 29889a2a45
2 changed files with 12 additions and 1 deletions

View file

@ -84,6 +84,7 @@ $string['noattempts'] = 'No attempts have been made on this assignment';
$string['nofilesyet'] = 'No files submitted yet'; $string['nofilesyet'] = 'No files submitted yet';
$string['nofiles'] = 'No files were submitted'; $string['nofiles'] = 'No files were submitted';
$string['notes'] = 'Notes'; $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['notesempty'] = 'No entry';
$string['notesupdateerror'] = 'Error when updating notes'; $string['notesupdateerror'] = 'Error when updating notes';
$string['notgradedyet'] = 'Not graded yet'; $string['notgradedyet'] = 'Not graded yet';

View 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); 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_header();
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_intro();
}
$this->view_dates(); $this->view_dates();
if (has_capability('mod/assignment:submit', $this->context)) { if (has_capability('mod/assignment:submit', $this->context)) {