Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Static Public Member Functions | List of all members
core_backup\copy\copy Class Reference

Course copy class. More...

Public Member Functions

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

Static Public Member Functions

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

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

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.

◆ 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.

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