MDL-8733 fixed approving logic when editing; merged from MOODLE_16_STABLE
This commit is contained in:
+2
-3
@@ -151,9 +151,8 @@
|
||||
/// All student edits are marked unapproved by default
|
||||
$record = get_record('data_records','id',$rid);
|
||||
|
||||
if ($data->approval == 1 || has_capability('mod/data:approve', $context)) {
|
||||
$record->approved = 1;
|
||||
} else {
|
||||
/// reset approved flag after student edit
|
||||
if (!has_capability('mod/data:approve', $context)) {
|
||||
$record->approved = 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user