mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
MDL-66489 enrol: prevent warning when the duration field is disabled
This commit is contained in:
parent
2d4ce64dde
commit
3919150d37
@ -87,7 +87,7 @@ if ($mform->is_cancelled()) {
|
||||
redirect($returnurl);
|
||||
|
||||
} else if ($data = $mform->get_data()) {
|
||||
if ($data->duration && $data->timeend == 0) {
|
||||
if (!empty($data->duration) && $data->timeend == 0) {
|
||||
$data->timeend = $data->timestart + $data->duration;
|
||||
}
|
||||
if ($manager->edit_enrolment($ue, $data)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user