assignment intro hiding before available date is now optional in advanced upload type ( MDL-6131 ), the rest of types will not be changed

This commit is contained in:
skodak 2006-10-02 08:21:35 +00:00
parent 27160c814b
commit 8c408f8e46
3 changed files with 17 additions and 2 deletions

View file

@ -23,8 +23,8 @@ class assignment_upload extends assignment_base {
$this->view_header();
if ($this->assignment->timeavailable > time()
and !has_capability('mod/assignment:grade', $this->context)) {
//not open yet === no instructions
and !has_capability('mod/assignment:grade', $this->context) // grading user can see it anytime
and $this->assignment->var3) { // force hiding before available date
print_simple_box_start('center', '', '', '', 'generalbox', 'intro');
print_string('notavailableyet', 'assignment');
print_simple_box_end();

View file

@ -5,6 +5,9 @@
if (empty($form->var2)) {
$form->var2 = 0; // enable notes
}
if (empty($form->var3)) {
$form->var3 = 0; // force intro hiding before available date
}
if (empty($form->resubmit)) {
$form->resubmit = 1; // allow deleting
}
@ -64,6 +67,17 @@
</td>
</tr>
<tr>
<td align="right"><b><?php print_string("hideintro", "assignment") ?>:</b></td>
<td>
<?php
$options = array(0=>get_string("no"), 1=>get_string("yes"));
choose_from_menu($options, "var3", $form->var3, "");
helpbutton("hideintro", get_string("hideintro", "assignment"), "assignment");
?>
</td>
</tr>
<tr>
<td align="right"><b><?php print_string("emailteachers", "assignment") ?>:</b></td>
<td>