Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core_backup\copy\copy Class Reference

Course copy class. More...

Public Member Functions

 __construct (\stdClass $formdata)
 Constructor for the class.
 
 create_copy ()
 Creates a course copy.
 

Static Public Member Functions

static get_copies (int $userid, int $courseid=0)
 Get the in progress course copy operations for a user.
 

Detailed Description

Course copy class.

Handles procesing data submitted by UI copy form and sets up the course copy process.

Author
Matt Porritt mattp.nosp@m.@cat.nosp@m.alyst.nosp@m.-au..nosp@m.net
License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Deprecated
since Moodle 4.1 MDL-74548 - please use copy_helper instead
Todo
MDL-75022 This class will be deleted in Moodle 4.5
See also
copy_helper

Constructor & Destructor Documentation

◆ __construct()

core_backup\copy\copy::__construct ( \stdClass $formdata)

Constructor for the class.

Parameters
stdClass$formdataData from the validated course copy form.

Member Function Documentation

◆ create_copy()

core_backup\copy\copy::create_copy ( )

Creates a course copy.

Sets up relevant controllers and adhoc task.

Return values
array\$copyidsTHe backup and restore controller ids.
Deprecated
since Moodle 4.1 MDL-74548 - please use copy_helper instead.
Todo
MDL-75023 This method will be deleted in Moodle 4.5
See also
copy_helper\process_formdata()
copy_helper\create_copy()

◆ get_copies()

static core_backup\copy\copy::get_copies ( int $userid,
int $courseid = 0 )
static

Get the in progress course copy operations for a user.

Parameters
int$useridUser id to get the course copies for.
int$courseidThe optional source course id to get copies for.
Return values
array\$copiesDetails of the inprogress copies.
Deprecated
since Moodle 4.1 MDL-74548 - please use copy_helper\get_copies() instead.
Todo
MDL-75024 This method will be deleted in Moodle 4.5
See also
copy_helper\get_copies()

The documentation for this class was generated from the following file: