mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-38180 do not add links for enrol and other users candidates
This commit is contained in:
parent
7112729206
commit
d2f3c5c58d
2 changed files with 16 additions and 2 deletions
|
@ -71,8 +71,15 @@ switch ($action) {
|
|||
$perpage = optional_param('perpage', 25, PARAM_INT); // This value is hard-coded to 25 in quickenrolment.js
|
||||
$outcome->response = $manager->get_potential_users($enrolid, $search, $searchanywhere, $page, $perpage, $addedenrollment);
|
||||
$extrafields = get_extra_user_fields($context);
|
||||
$useroptions = array();
|
||||
// User is not enrolled yet, either link to site profile or do not link at all.
|
||||
if (has_capability('moodle/user:viewdetails', context_system::instance())) {
|
||||
$useroptions['courseid'] = SITEID;
|
||||
} else {
|
||||
$useroptions['link'] = false;
|
||||
}
|
||||
foreach ($outcome->response['users'] as &$user) {
|
||||
$user->picture = $OUTPUT->user_picture($user);
|
||||
$user->picture = $OUTPUT->user_picture($user, $useroptions);
|
||||
$user->fullname = fullname($user);
|
||||
$fieldvalues = array();
|
||||
foreach ($extrafields as $field) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue