improved hiding support in grade/

This commit is contained in:
skodak 2007-08-09 16:19:06 +00:00
parent e3fa6587ee
commit f60c61b1b2
11 changed files with 98 additions and 60 deletions

View file

@ -130,11 +130,11 @@ if ($data = $mform->get_data(false)) {
$grade_item->update();
}
// update hiding flag (in grades too if needed)
if (empty($hidden)) {
$grade_item->set_hidden($hiddenuntil);
// update hiding flag
if ($hiddenuntil) {
$grade_item->set_hidden($hiddenuntil, false);
} else {
$grade_item->set_hidden(1);
$grade_item->set_hidden($hidden, false);
}
$grade_item->set_locktime($locktime); // locktime first - it might be removed when unlocking