MDL-43056 tool_uploadcourse: Add capability to upload courses from file

An entrypoint capability has been added that allows accessing the
upload tool. Further relevant capability checks are then performed
depending on the action being taken during the upload process.

Co-authored-by: Marina Glancy <marina@moodle.com>
This commit is contained in:
David Woloszyn 2024-01-31 11:29:33 +11:00
parent f30110b5eb
commit 4807a4dd5f
27 changed files with 717 additions and 53 deletions

View file

@ -519,6 +519,16 @@ class enrol_guest_plugin extends enrol_plugin {
return $instance;
}
/**
* Fill custom fields data for a given enrolment plugin.
*
* @param array $enrolmentdata enrolment data.
* @param int $courseid Course ID.
* @return array Updated enrolment data with custom fields info.
*/
public function fill_enrol_custom_fields(array $enrolmentdata, int $courseid): array {
return $enrolmentdata + ['password' => ''];
}
}
/**