Merge branch 'w11_MDL-31790_m23_resetunenrol' of git://github.com/skodak/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2012-03-13 18:13:52 +01:00
commit b39877ef10
2 changed files with 11 additions and 8 deletions

View file

@ -81,7 +81,7 @@ class enrol_database_plugin extends enrol_plugin {
$instance = $ue->enrolmentinstance;
$params = $manager->get_moodlepage()->url->params();
$params['ue'] = $ue->id;
if ($this->allow_unenrol_user($instance, $ue) && has_capability('enrol/meta:unenrol', $context)) {
if ($this->allow_unenrol_user($instance, $ue) && has_capability('enrol/database:unenrol', $context)) {
$url = new moodle_url('/enrol/unenroluser.php', $params);
$actions[] = new user_enrolment_action(new pix_icon('t/delete', ''), get_string('unenrol', 'enrol'), $url, array('class'=>'unenrollink', 'rel'=>$ue->id));
}