mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-83479 backup: Added upgrade notes.
Also some small tweaks to address comments.
This commit is contained in:
parent
7eb9cd0e8b
commit
c4335a8e0e
12
.upgradenotes/MDL-83479-2025021301170445.yml
Normal file
12
.upgradenotes/MDL-83479-2025021301170445.yml
Normal file
@ -0,0 +1,12 @@
|
||||
issueNumber: MDL-83479
|
||||
notes:
|
||||
core_backup:
|
||||
- message: >-
|
||||
Added several hooks to the restore process to 1) Hook to allow extra settings to be defined for the course
|
||||
restore process. 2) Hook to allow adding extra fields to the copy course form. 3) Hook used by
|
||||
copy_helper::process_formdata() to expand the list of required fields. 4) Hook used to allow interaction with
|
||||
the copy task, before the actual task execution takes place.
|
||||
|
||||
Other changes include 1) base_task::add_setting() is now public to allow hook callbacks to add settings.
|
||||
2) Settings are now added to the data sent to the course_restored event.
|
||||
type: improved
|
@ -43,7 +43,7 @@ final class copy_helper {
|
||||
'fullname', // Fullname of the destination course.
|
||||
'shortname', // Shortname of the destination course.
|
||||
'category', // Category integer ID that contains the destination course.
|
||||
'visible', // Integer to determine of the copied course will be visible.
|
||||
'visible', // Integer to detrmine of the copied course will be visible.
|
||||
'startdate', // Integer timestamp of the start of the destination course.
|
||||
'enddate', // Integer timestamp of the end of the destination course.
|
||||
'idnumber', // ID of the destination course.
|
||||
|
@ -270,6 +270,15 @@ abstract class base_task implements checksumable, executable, loggable {
|
||||
}
|
||||
}
|
||||
|
||||
// Protected API starts here
|
||||
|
||||
/**
|
||||
* This function is invoked on activity creation in order to add all the settings
|
||||
* that are associated with one task. The function will, directly, inject the settings
|
||||
* in the task.
|
||||
*/
|
||||
abstract protected function define_settings();
|
||||
|
||||
/**
|
||||
* Add a setting to the task.
|
||||
*
|
||||
@ -282,15 +291,6 @@ abstract class base_task implements checksumable, executable, loggable {
|
||||
}
|
||||
$this->settings[] = $setting;
|
||||
}
|
||||
|
||||
// Protected API starts here
|
||||
|
||||
/**
|
||||
* This function is invoked on activity creation in order to add all the settings
|
||||
* that are associated with one task. The function will, directly, inject the settings
|
||||
* in the task.
|
||||
*/
|
||||
abstract protected function define_settings();
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user