Copy helper class.
More...
|
static | cleanup_orphaned_copy_controllers (array $backuprecords, int $age=MINSECS) |
| Detects and deletes/fails controllers associated with a course copy that are in an invalid state.
|
|
static | create_copy (\stdClass $copydata) |
| Creates a course copy.
|
|
static | get_copies (int $userid, ?int $courseid=null) |
| Get the in progress course copy operations for a user.
|
|
static | process_formdata (\stdClass $formdata) |
| Process raw form data from copy_form.
|
|
Copy helper class.
- Copyright
- 2022 Catalyst IT Australia Pty Ltd
- Author
- Cameron Ball camer.nosp@m.on@c.nosp@m.amero.nosp@m.n172.nosp@m.9.xyz
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ cleanup_orphaned_copy_controllers()
static copy_helper::cleanup_orphaned_copy_controllers |
( |
array | $backuprecords, |
|
|
int | $age = MINSECS ) |
|
static |
Detects and deletes/fails controllers associated with a course copy that are in an invalid state.
- Parameters
-
array | $backuprecords | An array of records from {backup_controllers} |
int | $age | How old a controller needs to be (in seconds) before its considered for cleaning |
- Return values
-
◆ create_copy()
static copy_helper::create_copy |
( |
\stdClass | $copydata | ) |
|
|
static |
Creates a course copy.
Sets up relevant controllers and adhoc task.
- Parameters
-
stdClass | $copydata | Course copy data from process_formdata |
- Return values
-
array\$copyids | The backup and restore controller ids |
◆ get_copies()
static copy_helper::get_copies |
( |
int | $userid, |
|
|
?int | $courseid = null ) |
|
static |
Get the in progress course copy operations for a user.
- Parameters
-
int | $userid | User id to get the course copies for. |
int | null | $courseid | The optional source course id to get copies for. |
- Return values
-
array\$copies | Details of the inprogress copies. |
◆ process_formdata()
static copy_helper::process_formdata |
( |
\stdClass | $formdata | ) |
|
|
static |
Process raw form data from copy_form.
- Parameters
-
stdClass | $formdata | Raw formdata |
- Return values
-
stdClass | Processed data for use with create_copy |
The documentation for this class was generated from the following file: