Merge branch 'MDL-58928-alt-attribute-enrolment-edit-delete-icons' of https://github.com/lucaboesch/moodle
This commit is contained in:
@@ -237,8 +237,8 @@ class enrol_cohort_plugin extends enrol_plugin {
|
||||
if ($this->allow_unenrol_user($instance, $ue) && has_capability('enrol/cohort:unenrol', $context)) {
|
||||
$url = new moodle_url('/enrol/unenroluser.php', $params);
|
||||
$actionparams = array('class' => 'unenrollink', 'rel' => $ue->id, 'data-action' => ENROL_ACTION_UNENROL);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/delete', ''), get_string('unenrol', 'enrol'), $url,
|
||||
$actionparams);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/delete', get_string('unenrol', 'enrol')),
|
||||
get_string('unenrol', 'enrol'), $url, $actionparams);
|
||||
}
|
||||
return $actions;
|
||||
}
|
||||
|
||||
@@ -98,8 +98,8 @@ class enrol_database_plugin extends enrol_plugin {
|
||||
if ($this->allow_unenrol_user($instance, $ue) && has_capability('enrol/database:unenrol', $context)) {
|
||||
$url = new moodle_url('/enrol/unenroluser.php', $params);
|
||||
$actionparams = array('class' => 'unenrollink', 'rel' => $ue->id, 'data-action' => ENROL_ACTION_UNENROL);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/delete', ''), get_string('unenrol', 'enrol'), $url,
|
||||
$actionparams);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/delete', get_string('unenrol', 'enrol')),
|
||||
get_string('unenrol', 'enrol'), $url, $actionparams);
|
||||
}
|
||||
return $actions;
|
||||
}
|
||||
|
||||
@@ -133,13 +133,14 @@ class enrol_flatfile_plugin extends enrol_plugin {
|
||||
if ($this->allow_unenrol_user($instance, $ue) && has_capability("enrol/flatfile:unenrol", $context)) {
|
||||
$url = new moodle_url('/enrol/unenroluser.php', $params);
|
||||
$actionparams = array('class' => 'unenrollink', 'rel' => $ue->id, 'data-action' => ENROL_ACTION_UNENROL);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/delete', ''), get_string('unenrol', 'enrol'), $url,
|
||||
$actionparams);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/delete', get_string('unenrol', 'enrol')),
|
||||
get_string('unenrol', 'enrol'), $url, $actionparams);
|
||||
}
|
||||
if ($this->allow_manage($instance) && has_capability("enrol/flatfile:manage", $context)) {
|
||||
$url = new moodle_url('/enrol/editenrolment.php', $params);
|
||||
$actionparams = array('class' => 'editenrollink', 'rel' => $ue->id, 'data-action' => ENROL_ACTION_EDIT);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/edit', ''), get_string('edit'), $url, $actionparams);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/edit', get_string('editenrolment', 'enrol')),
|
||||
get_string('editenrolment', 'enrol'), $url, $actionparams);
|
||||
}
|
||||
return $actions;
|
||||
}
|
||||
|
||||
+4
-3
@@ -393,13 +393,14 @@ class enrol_lti_plugin extends enrol_plugin {
|
||||
if ($this->allow_unenrol_user($instance, $ue) && has_capability("enrol/lti:unenrol", $context)) {
|
||||
$url = new moodle_url('/enrol/unenroluser.php', $params);
|
||||
$actionparams = array('class' => 'unenrollink', 'rel' => $ue->id, 'data-action' => ENROL_ACTION_UNENROL);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/delete', ''), get_string('unenrol', 'enrol'), $url,
|
||||
$actionparams);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/delete', get_string('unenrol', 'enrol')),
|
||||
get_string('unenrol', 'enrol'), $url, $actionparams);
|
||||
}
|
||||
if ($this->allow_manage($instance) && has_capability("enrol/lti:manage", $context)) {
|
||||
$url = new moodle_url('/enrol/editenrolment.php', $params);
|
||||
$actionparams = array('class' => 'editenrollink', 'rel' => $ue->id, 'data-action' => ENROL_ACTION_EDIT);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/edit', ''), get_string('edit'), $url, $actionparams);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/edit', get_string('editenrolment', 'enrol')),
|
||||
get_string('editenrolment', 'enrol'), $url, $actionparam);
|
||||
}
|
||||
return $actions;
|
||||
}
|
||||
|
||||
@@ -377,13 +377,14 @@ class enrol_manual_plugin extends enrol_plugin {
|
||||
if ($this->allow_unenrol_user($instance, $ue) && has_capability("enrol/manual:unenrol", $context)) {
|
||||
$url = new moodle_url('/enrol/unenroluser.php', $params);
|
||||
$actionparams = array('class' => 'unenrollink', 'rel' => $ue->id, 'data-action' => ENROL_ACTION_UNENROL);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/delete', ''), get_string('unenrol', 'enrol'), $url,
|
||||
$actionparams);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/delete', get_string('unenrol', 'enrol')),
|
||||
get_string('unenrol', 'enrol'), $url, $actionparams);
|
||||
}
|
||||
if ($this->allow_manage($instance) && has_capability("enrol/manual:manage", $context)) {
|
||||
$url = new moodle_url('/enrol/editenrolment.php', $params);
|
||||
$actionparams = array('class' => 'editenrollink', 'rel' => $ue->id, 'data-action' => ENROL_ACTION_EDIT);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/edit', ''), get_string('edit'), $url, $actionparams);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/edit', get_string('editenrolment', 'enrol')),
|
||||
get_string('editenrolment', 'enrol'), $url, $actionparams);
|
||||
}
|
||||
return $actions;
|
||||
}
|
||||
|
||||
+2
-2
@@ -111,8 +111,8 @@ class enrol_meta_plugin extends enrol_plugin {
|
||||
if ($this->allow_unenrol_user($instance, $ue) && has_capability('enrol/meta:unenrol', $context)) {
|
||||
$url = new moodle_url('/enrol/unenroluser.php', $params);
|
||||
$actionparams = array('class' => 'unenrollink', 'rel' => $ue->id, 'data-action' => ENROL_ACTION_UNENROL);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/delete', ''), get_string('unenrol', 'enrol'), $url,
|
||||
$actionparams);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/delete', get_string('unenrol', 'enrol')),
|
||||
get_string('unenrol', 'enrol'), $url, $actionparams);
|
||||
}
|
||||
return $actions;
|
||||
}
|
||||
|
||||
@@ -292,13 +292,14 @@ class enrol_paypal_plugin extends enrol_plugin {
|
||||
if ($this->allow_unenrol($instance) && has_capability("enrol/paypal:unenrol", $context)) {
|
||||
$url = new moodle_url('/enrol/unenroluser.php', $params);
|
||||
$actionparams = array('class' => 'unenrollink', 'rel' => $ue->id, 'data-action' => ENROL_ACTION_UNENROL);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/delete', ''), get_string('unenrol', 'enrol'), $url,
|
||||
$actionparams);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/delete', get_string('unenrol', 'enrol')),
|
||||
get_string('unenrol', 'enrol'), $url, $actionparams);
|
||||
}
|
||||
if ($this->allow_manage($instance) && has_capability("enrol/paypal:manage", $context)) {
|
||||
$url = new moodle_url('/enrol/editenrolment.php', $params);
|
||||
$actionparams = array('class' => 'editenrollink', 'rel' => $ue->id, 'data-action' => ENROL_ACTION_EDIT);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/edit', ''), get_string('edit'), $url, $actionparams);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/edit', get_string('editenrolment', 'enrol')),
|
||||
get_string('editenrolment', 'enrol'), $url, $actionparams);
|
||||
}
|
||||
return $actions;
|
||||
}
|
||||
|
||||
+4
-3
@@ -537,13 +537,14 @@ class enrol_self_plugin extends enrol_plugin {
|
||||
if ($this->allow_unenrol($instance) && has_capability("enrol/self:unenrol", $context)) {
|
||||
$url = new moodle_url('/enrol/unenroluser.php', $params);
|
||||
$actionparams = array('class' => 'unenrollink', 'rel' => $ue->id, 'data-action' => ENROL_ACTION_UNENROL);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/delete', ''), get_string('unenrol', 'enrol'), $url,
|
||||
$actionparams);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/delete', get_string('unenrol', 'enrol')),
|
||||
get_string('unenrol', 'enrol'), $url, $actionparams);
|
||||
}
|
||||
if ($this->allow_manage($instance) && has_capability("enrol/self:manage", $context)) {
|
||||
$url = new moodle_url('/enrol/editenrolment.php', $params);
|
||||
$actionparams = array('class' => 'editenrollink', 'rel' => $ue->id, 'data-action' => ENROL_ACTION_EDIT);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/edit', ''), get_string('edit'), $url, $actionparams);
|
||||
$actions[] = new user_enrolment_action(new pix_icon('t/edit', get_string('editenrolment', 'enrol')),
|
||||
get_string('editenrolment', 'enrol'), $url, $actionparams);
|
||||
}
|
||||
return $actions;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user