Browse files

Merge branch 'MDL-38254_m24' of git://github.com/rwijaya/moodle into …

…MOODLE_24_STABLE
  • Loading branch information...
2 parents a1ec118 + 079a76b commit 3a44f70e628fed7357a0e75ea667cfdf051eef60 @danpoltawski danpoltawski committed Apr 10, 2013
View
6 mod/assignment/lib.php
@@ -165,6 +165,12 @@ function view() {
$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();
View
4 mod/assignment/type/online/assignment.class.php
@@ -127,7 +127,9 @@ function view() {
$button->render();
}
} else if ($this->isopen()){ //fix for #4206
- echo '<div style="text-align:center">'.get_string('emptysubmission', 'assignment').'</div>';
+ echo $OUTPUT->heading(get_string('emptysubmission','assignment'), 3);
+ } else if ($this->assignment->timeavailable > time()) {
+ echo $OUTPUT->heading(get_string('futureaassignment','assignment'), 3);
}
}
echo $OUTPUT->box_end();
View
8 mod/assignment/type/uploadsingle/assignment.class.php
@@ -85,8 +85,12 @@ function view() {
}
}
- if (is_enrolled($this->context, $USER, 'mod/assignment:submit') && $this->isopen() && (!$filecount || $this->assignment->resubmit || !$submission->timemarked)) {
- $this->view_upload_form();
+ 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);
+ }
}
$this->view_footer();

0 comments on commit 3a44f70

Please sign in to comment.