mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Fix for MDL-6628: the lesson object was not being cloned correctly.
This commit is contained in:
parent
6707a280a9
commit
31b50f6442
@ -165,7 +165,6 @@ function lesson_update_instance($lesson) {
|
||||
if ($lesson->lessondefault) {
|
||||
$default = new stdClass;
|
||||
$default = clone($lesson);
|
||||
$default = $lesson;
|
||||
unset($default->lessondefault);
|
||||
unset($default->name);
|
||||
unset($default->timemodified);
|
||||
@ -215,7 +214,7 @@ function lesson_update_instance($lesson) {
|
||||
}
|
||||
|
||||
add_event($event);
|
||||
|
||||
|
||||
return update_record("lesson", $lesson);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user