| Línea 229... |
Línea 229... |
| 229 |
return false;
|
229 |
return false;
|
| 230 |
};
|
230 |
};
|
| 231 |
$filteredusers = array_filter($users, $matchesplugin);
|
231 |
$filteredusers = array_filter($users, $matchesplugin);
|
| Línea 232... |
Línea 232... |
| 232 |
|
232 |
|
| 233 |
// If the bulk operation is deleting enrolments, we exclude in any case the current user as it was probably a mistake.
|
233 |
// If the bulk operation is deleting enrolments, we exclude in any case the current user as it was probably a mistake.
|
| 234 |
if ($operationname === 'deleteselectedusers' && (!in_array($USER->id, $removed))) {
|
234 |
if ($operationname === 'deleteselectedusers' && array_key_exists($USER->id, $filteredusers)) {
|
| 235 |
\core\notification::warning(get_string('userremovedfromselectiona', 'enrol', fullname($USER)));
|
235 |
\core\notification::warning(get_string('userremovedfromselectiona', 'enrol', fullname($USER)));
|
| 236 |
unset($filteredusers[$USER->id]);
|
236 |
unset($filteredusers[$USER->id]);
|
| Línea 237... |
Línea 237... |
| 237 |
}
|
237 |
}
|