MDL-49202 core_grades: perform same action on items in form

When you click on 'Edit' then 'Hide' on a grade item like an
assignment it also hides the grades. However, If you use the
'hidden' option on the 'Edit settings' page it just hides that
item and doesn't hide grades as well. We want them to be
consistent.
This commit is contained in:
Mark Nelson 2021-08-17 20:12:27 +08:00
parent 036800d99d
commit 25bce5c526

View File

@ -190,7 +190,7 @@ if ($mform->is_cancelled()) {
if ($item->cancontrolvisibility) {
// Update hiding flag.
$gradeitem->set_hidden($hide, false);
$gradeitem->set_hidden($hide, true);
}
$gradeitem->set_locktime($locktime); // Locktime first - it might be removed when unlocking.