Commit de027f1f authored by Hugh Davenport's avatar Hugh Davenport
Browse files

Fix error about missing retainview in institution sharing



Bug #890528

Change-Id: Ie2197d6d77e3125247f40a16809b1f6e1dc61d6d
Signed-off-by: default avatarHugh Davenport <hugh@catalyst.net.nz>
parent ed48acb7
......@@ -414,7 +414,7 @@ function editaccess_validate(Pieform $form, $values) {
$form->set_error('copyfornewgroups', get_string('viewscopiedfornewgroupsmustbecopyable', 'view'));
}
}
$retainview = $values['retainview'];
$retainview = isset($values['retainview']) ? $values['retainview'] : false;
if ($retainview && !$values['template']) {
$form->set_error('retainview', get_string('viewswithretainviewrightsmustbecopyable', 'view'));
}
......@@ -505,7 +505,7 @@ function editaccess_submit(Pieform $form, $values) {
'startdate' => $values['startdate'],
'stopdate' => $values['stopdate'],
'template' => (int) $values['template'],
'retainview' => (int) $values['retainview'],
'retainview' => isset($values['retainview']) ? (int) $values['retainview'] : 0,
'allowcomments' => (int) $values['allowcomments'],
'approvecomments' => (int) ($values['allowcomments'] && $values['approvecomments']),
'accesslist' => $values['accesslist'],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment