The import_processor class.
More...
|
object | $course = null |
| The course that we are uploading to.
|
|
string[] | $descriptionoverrides = ['folder', 'page', 'resource', 'scorm', 'url'] |
| $descriptionoverrides list of modules which support having their descriptions updated, post-import.
|
|
import_handler_info | $handlerinfo |
| $handlerinfo information about the module handling the import.
|
|
import_handler_registry | $handlerregistry |
| $handlerregistry registry object to use for cross checking the supplied handler.
|
|
remote_resource | $remoteresource |
| $remoteresource the remote resource being imported.
|
|
int | $section = null |
| The section number we are uploading to.
|
|
stdClass | $user |
| $user the user conducting the import.
|
|
The import_processor class.
The import_processor objects provide a means to import a remote resource into a course section, delegating the handling of content to the relevant module, via its dndupload_handler callback.
- Copyright
- 2020 Jake Dallimore jrhda.nosp@m.llim.nosp@m.ore@g.nosp@m.mail.nosp@m..com
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
The import_processor constructor.
- Parameters
-
stdClass | $course | the course object. |
int | $section | the section number in the course, starting at 0. |
remote_resource | $remoteresource | the remote resource to import. |
import_handler_info | $handlerinfo | information about which module is handling the import. |
import_handler_registry | $handlerregistry | A registry of import handlers, to use for validation. |
- Exceptions
-
◆ create_course_module()
tool_moodlenet\local\import_processor::create_course_module |
( |
\stdClass |
$course, |
|
|
int |
$section, |
|
|
string |
$modname |
|
) |
| |
|
protected |
Create the course module to hold the file/content that has been uploaded.
- Parameters
-
stdClass | $course | the course object. |
int | $section | the section. |
string | $modname | the name of the module, e.g. 'label'. |
- Return values
-
stdClass | the course module data. |
◆ finish_setup_course_module()
tool_moodlenet\local\import_processor::finish_setup_course_module |
( |
|
$instanceid, |
|
|
int |
$cmid |
|
) |
| |
|
protected |
Finish off any course module setup, such as adding to the course section and firing events.
- Parameters
-
int | $instanceid | id returned by the mod when it was created. |
int | $cmid | the course module record id, for removal if something went wrong. |
◆ update_module_description()
tool_moodlenet\local\import_processor::update_module_description |
( |
int |
$instanceid | ) |
|
|
protected |
Update the module's description (intro), if that feature is supported.
- Parameters
-
int | $instanceid | the instance id of the module to update. |
The documentation for this class was generated from the following file: