mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
MDL-23532 enrol - removed general handling of user enrolment editing/unenrolment plugins are now responsible for this
This commit is contained in:
parent
8c6e0ebebb
commit
12a52d7c6e
4 changed files with 4 additions and 120 deletions
|
@ -1540,17 +1540,6 @@ abstract class enrol_plugin {
|
|||
* @return array An array of user_enrolment_actions
|
||||
*/
|
||||
public function get_user_enrolment_actions(course_enrolment_manager $manager, $ue) {
|
||||
$actions = array();
|
||||
$context = $manager->get_context();
|
||||
$instance = $ue->enrolmentinstance;
|
||||
if ($this->allow_unenrol($instance) && has_capability("enrol/".$instance->enrol.":unenrol", $context)) {
|
||||
$url = new moodle_url($manager->get_moodlepage()->url, array('action' => 'unenrol', 'ue' => $ue->id));
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/delete', ''), get_string('unenrol', 'enrol'), $url, array('class'=>'unenrollink', 'rel'=>$ue->id));
|
||||
}
|
||||
if ($this->allow_manage($instance) && has_capability("enrol/".$instance->enrol.":manage", $context)) {
|
||||
$url = new moodle_url($manager->get_moodlepage()->url, array('action' => 'edit', 'ue' => $ue->id));
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/edit', ''), get_string('edit'), $url, array('class'=>'editenrollink', 'rel'=>$ue->id));
|
||||
}
|
||||
return $actions;
|
||||
return array();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue