Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

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?

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_newinstance_link($courseid)   X-Ref
Returns link to page which may be used to add new instance of enrolment plugin in course.

param: int $courseid
return: moodle_url page url

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

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

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