/** * Returns list of unenrol links for all enrol instances in course. * * @param int $instance * * @return moodle_url or NULL if self unenrolment not supported */ public function get_unenrolself_link($instance) { if ($instance->customint1 > 0) { // Don't offer unenrolself if we are going to re-enrol them on login. return null; } return parent::get_unenrolself_link($instance); }