mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Attempting to make the form more compact by merging yes/no fields as an enable checkbox after another field to enable/disable the feature
This commit is contained in:
parent
807d0c3199
commit
862bd9cd9c
2 changed files with 33 additions and 6 deletions
|
@ -489,6 +489,9 @@ function lesson_get_post_actions() {
|
|||
function lesson_process_pre_save(&$lesson) {
|
||||
$lesson->timemodified = time();
|
||||
|
||||
if (empty($lesson->timed)) {
|
||||
$lesson->timed = 0;
|
||||
}
|
||||
if (empty($lesson->timespent) or !is_numeric($lesson->timespent) or $lesson->timespent < 0) {
|
||||
$lesson->timespent = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue