(no description)
File Size: | 310 lines (13 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
copy_helper:: (5 methods):
process_formdata()
create_copy()
get_copies()
map_backupids_to_restore_controller()
cleanup_orphaned_copy_controllers()
Class: copy_helper - X-Ref
Copy helper class.process_formdata(\stdClass $formdata) X-Ref |
Process raw form data from copy_form. param: \stdClass $formdata Raw formdata return: \stdClass Processed data for use with create_copy |
create_copy(\stdClass $copydata) X-Ref |
Creates a course copy. Sets up relevant controllers and adhoc task. param: \stdClass $copydata Course copy data from process_formdata return: array $copyids The backup and restore controller ids |
get_copies(int $userid, ?int $courseid = null) X-Ref |
Get the in progress course copy operations for a user. param: int $userid User id to get the course copies for. param: int|null $courseid The optional source course id to get copies for. return: array $copies Details of the inprogress copies. |
map_backupids_to_restore_controller(array $backuprecords) X-Ref |
Returns a mapping between copy controller IDs and the restore controller. For example if there exists a copy with backup ID abc and restore ID 123 then this mapping will map both keys abc and 123 to the same (instantiated) restore controller. param: array $backuprecords An array of records from {backup_controllers} return: array An array of mappings between backup ids and restore controllers |
cleanup_orphaned_copy_controllers(array $backuprecords, int $age = MINSECS) X-Ref |
No description |