| [ Index ] |
PHP Cross Reference of Unnamed Project |
[Source view] [Print] [Project Stats]
File containing the course class.
| Copyright: | 2013 Frédéric Massart |
| License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
| File Size: | 922 lines (36 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
tool_uploadcourse_course:: (24 methods):
__construct()
can_create()
can_delete()
can_only_create()
can_rename()
can_reset()
can_update()
can_use_defaults()
delete()
error()
exists()
get_data()
get_errors()
get_final_create_data()
get_final_update_data()
get_id()
get_restore_content_dir()
get_statuses()
has_errors()
prepare()
proceed()
process_enrolment_data()
reset()
status()
Class: tool_uploadcourse_course - X-Ref
Course class.| __construct($mode, $updatemode, $rawdata, $defaults = array() X-Ref |
| Constructor param: int $mode import mode, constant matching tool_uploadcourse_processor::MODE_* param: int $updatemode update mode, constant matching tool_uploadcourse_processor::UPDATE_* param: array $rawdata raw course data. param: array $defaults default course data. param: array $importoptions import options. |
| can_create() X-Ref |
| Does the mode allow for course creation? return: bool |
| can_delete() X-Ref |
| Does the mode allow for course deletion? return: bool |
| can_only_create() X-Ref |
| Does the mode only allow for course creation? return: bool |
| can_rename() X-Ref |
| Does the mode allow for course rename? return: bool |
| can_reset() X-Ref |
| Does the mode allow for course reset? return: bool |
| can_update() X-Ref |
| Does the mode allow for course update? return: bool |
| can_use_defaults() X-Ref |
| Can we use default values? return: bool |
| delete() X-Ref |
| Delete the current course. return: bool |
| error($code, lang_string $message) X-Ref |
| Log an error param: string $code error code. param: lang_string $message error message. return: void |
| exists($shortname = null) X-Ref |
| Return whether the course exists or not. param: string $shortname the shortname to use to check if the course exists. Falls back on $this->shortname if empty. return: bool |
| get_data() X-Ref |
| Return the data that will be used upon saving. return: null|array |
| get_errors() X-Ref |
| Return the errors found during preparation. return: array |
| get_final_create_data($data) X-Ref |
| Assemble the course data based on defaults. This returns the final data to be passed to create_course(). param: array $data current data. return: array |
| get_final_update_data($data, $usedefaults = false, $missingonly = false) X-Ref |
| Assemble the course data based on defaults. This returns the final data to be passed to update_course(). param: array $data current data. param: bool $usedefaults are defaults allowed? param: bool $missingonly ignore fields which are already set. return: array |
| get_id() X-Ref |
| Return the ID of the processed course. return: int|null |
| get_restore_content_dir() X-Ref |
| Get the directory of the object to restore. return: string|false|null subdirectory in $CFG->tempdir/backup/..., false when an error occured |
| get_statuses() X-Ref |
| Return the errors found during preparation. return: array |
| has_errors() X-Ref |
| Return whether there were errors with this course. return: boolean |
| prepare() X-Ref |
| Validates and prepares the data. return: bool false is any error occured. |
| proceed() X-Ref |
| Proceed with the import of the course. return: void |
| process_enrolment_data($course) X-Ref |
| Add the enrolment data for the course. param: object $course course record. return: void |
| reset($course) X-Ref |
| Reset the current course. This does not reset any of the content of the activities. param: stdClass $course the course object of the course to reset. return: array status array of array component, item, error. |
| status($code, lang_string $message) X-Ref |
| Log a status param: string $code status code. param: lang_string $message status message. return: void |
| Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |