mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
MDL-49748 mod_data: update fields even when empty
This commit is contained in:
parent
d7551257a0
commit
23464633c8
@ -3836,11 +3836,9 @@ function data_process_submission(stdClass $mod, $fields, stdClass $datarecord) {
|
||||
$requiredfieldsfilled = false;
|
||||
}
|
||||
|
||||
if ($fieldhascontent) {
|
||||
// The field has content so it should be updatable.
|
||||
foreach ($submitteddata[$fieldrecord->id] as $value) {
|
||||
$result->fields[$value->fieldname] = $field;
|
||||
}
|
||||
// Update the field.
|
||||
foreach ($submitteddata[$fieldrecord->id] as $value) {
|
||||
$result->fields[$value->fieldname] = $field;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user