See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 39 and 401]
Course copy class. Handles procesing data submitted by UI copy form and sets up the course copy process.
Author: | Matt Porritt <mattp@catalyst-au.net> |
Copyright: | 2020 onward The Moodle Users Association <https://moodleassociation.org/> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 170 lines (6 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
copy:: (1 method):
__construct()
instead:: (4 methods):
get_enrollment_roles()
get_copy_data()
create_copy()
get_copies()
__construct(\stdClass $formdata) X-Ref |
Constructor for the class. param: \stdClass $formdata Data from the validated course copy form. |
get_enrollment_roles(\stdClass $formdata) X-Ref |
Extract the enrolment roles to keep in the copied course from the raw submitted form data. param: \stdClass $formdata Data from the validated course copy form. return: array $keptroles The roles to keep. |
get_copy_data(\stdClass $formdata) X-Ref |
Take the validated form data and extract the required information for copy operations. param: \stdClass $formdata Data from the validated course copy form. return: \stdClass $copydata Data required for course copy operations. |
create_copy() X-Ref |
Creates a course copy. Sets up relevant controllers and adhoc task. return: array $copyids THe backup and restore controller ids. |
get_copies(int $userid, int $courseid=0) 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 $courseid The optional source course id to get copies for. return: array $copies Details of the inprogress copies. |