Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Category enrolment plugin.

Copyright: 2010 Petr Skoda {@link http://skodak.org}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 107 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

enrol_category_plugin:: (5 methods):
  can_delete_instance()
  can_hide_show_instance()
  get_newinstance_link()
  course_updated()
  restore_sync_course()


Class: enrol_category_plugin  - X-Ref

category enrolment plugin implementation.

can_delete_instance($instance)   X-Ref
Is it possible to delete enrol instance via standard UI?

return: bool
param: stdClass $instance

can_hide_show_instance($instance)   X-Ref
Is it possible to hide/show enrol instance via standard UI?

return: bool
param: stdClass $instance

get_newinstance_link($courseid)   X-Ref
Returns link to page which may be used to add new instance of enrolment plugin in course.

return: moodle_url page url
param: int $courseid

course_updated($inserted, $course, $data)   X-Ref
Called after updating/inserting course.

return: void
param: bool $inserted true if course just inserted
param: stdClass $course
param: stdClass $data form data

restore_sync_course($course)   X-Ref
Automatic enrol sync executed during restore.
Useful for automatic sync by course->idnumber or course category.

param: stdClass $course course record