See Release Notes
Long Term Support Release
Contains the import_processor class.
Copyright: | 2020 Jake Dallimore <jrhdallimore@gmail.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 206 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
import_processor:: (5 methods):
__construct()
process()
update_module_description()
create_course_module()
finish_setup_course_module()
Class: import_processor - X-Ref
The import_processor class.__construct(\stdClass $course, int $section, remote_resource $remoteresource, import_handler_info $handlerinfo,import_handler_registry $handlerregistry) X-Ref |
The import_processor constructor. param: \stdClass $course the course object. param: int $section the section number in the course, starting at 0. param: remote_resource $remoteresource the remote resource to import. param: import_handler_info $handlerinfo information about which module is handling the import. param: import_handler_registry $handlerregistry A registry of import handlers, to use for validation. |
process() X-Ref |
Run the import process, including file download, module creation and cleanup (cache purge, etc). |
update_module_description(int $instanceid) X-Ref |
Update the module's description (intro), if that feature is supported. param: int $instanceid the instance id of the module to update. |
create_course_module(\stdClass $course, int $section, string $modname) X-Ref |
Create the course module to hold the file/content that has been uploaded. param: \stdClass $course the course object. param: int $section the section. param: string $modname the name of the module, e.g. 'label'. return: \stdClass the course module data. |
finish_setup_course_module($instanceid, int $cmid) X-Ref |
Finish off any course module setup, such as adding to the course section and firing events. param: int $instanceid id returned by the mod when it was created. param: int $cmid the course module record id, for removal if something went wrong. |