-
Improvement
-
Resolution: Fixed
-
Minor
-
2.1, 2.2, 2.3
-
MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
-
MOODLE_22_STABLE
-
w52_
MDL-30945_m23_unenrol -
At present have a method
/**
|
* Does this plugin allow manual unenrolments?
|
*
|
* @param stdClass $instance course enrol instance
|
* All plugins allowing this must implement 'enrol/xxx:unenrol' capability
|
*
|
* @return bool - true means user with 'enrol/xxx:unenrol' may unenrol others freely, trues means nobody may touch user_enrolments
|
*/
|
public function allow_unenrol(stdClass $instance) {
|
return false;
|
}
|
I would like to add new similar method which is aimed at one user enrolment only:
|
/**
|
* Does this plugin allow manual unenrolment of a specific user?
|
* All plugins allowing this must implement 'enrol/xxx:unenrol' capability
|
*
|
* This is useful especially for synchronisation plugins that
|
* do suspend instead of full unenrolment.
|
*
|
* @param stdClass $instance course enrol instance
|
* @param stdClass $ue record from user_enrolments table
|
*
|
* @return bool - true means user with 'enrol/xxx:unenrol' may unenrol this user, false means nobody may touch this user enrolment
|
*/
|
public function allow_unenrol_user(stdClass $instance, stdClass $ue) {
|
return $this->allow_unenrol($instance);
|
}
|
- blocks
-
MDL-31374 backport meta course sync plugin fixes and improvements from master to 2.2
-
- Closed
-
-
MDL-29684 meta course sync plugin fixes and improvements
-
- Closed
-
-
MDL-30944 fix bugs and improve enrol_cohort
-
- Closed
-
- Testing discovered
-
MDL-31012 Add bulk unenrolment functionality to 'self enrolment' plugin
-
- Closed
-