See Release Notes
Long Term Support Release
MNet enrolment plugin
Copyright: | 2010 David Mudrak <david@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 213 lines (8 kb) |
Included or required: | 1 time |
Referenced: | 0 times |
Includes or requires: | 0 files |
enrol_mnet_plugin:: (9 methods):
get_instance_name()
can_add_instance()
can_delete_instance()
can_hide_show_instance()
get_valid_hosts_options()
get_valid_roles_options()
edit_instance_form()
use_standard_editing_ui()
edit_instance_validation()
Class: enrol_mnet_plugin - X-Ref
MNet enrolment plugin implementation for Moodle 2.x enrolment frameworkget_instance_name($instance) X-Ref |
Returns localised name of enrol instance param: object|null $instance enrol_mnet instance return: string |
can_add_instance($courseid) X-Ref |
Returns true if a new instance can be added to this course. The link is returned only if there are some MNet peers that we publish enrolment service to. param: int $courseid id of the course to add the instance to return: boolean |
can_delete_instance($instance) X-Ref |
Is it possible to delete enrol instance via standard UI? param: stdClass $instance return: bool |
can_hide_show_instance($instance) X-Ref |
Is it possible to hide/show enrol instance via standard UI? param: stdClass $instance return: bool |
get_valid_hosts_options() X-Ref |
Return an array of valid options for the hosts property. return: array |
get_valid_roles_options($context) X-Ref |
Return an array of valid options for the roles property. param: context $context return: array |
edit_instance_form($instance, MoodleQuickForm $mform, $context) X-Ref |
Add elements to the edit instance form. param: stdClass $instance param: MoodleQuickForm $mform param: context $context return: bool |
use_standard_editing_ui() X-Ref |
We are a good plugin and don't invent our own UI/validation code path. return: boolean |
edit_instance_validation($data, $files, $instance, $context) X-Ref |
Perform custom validation of the data used to edit the instance. param: array $data array of ("fieldname"=>value) of submitted data param: array $files array of uploaded files "element_name"=>tmp_file_path param: object $instance The instance loaded from the DB param: context $context The context of the instance we are editing return: array of "element_name"=>"error_description" if there are errors, return: void |