Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is 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