mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'w12_MDL-38180_m25_enrolpics' of git://github.com/skodak/moodle
This commit is contained in:
commit
66f1870701
@ -96,9 +96,16 @@ switch ($action) {
|
||||
$page = optional_param('page', 0, PARAM_INT);
|
||||
$outcome->response = $manager->search_other_users($search, $searchanywhere, $page);
|
||||
$extrafields = get_extra_user_fields($context);
|
||||
$useroptions = array();
|
||||
// User is not enrolled, 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->userId = $user->id;
|
||||
$user->picture = $OUTPUT->user_picture($user);
|
||||
$user->picture = $OUTPUT->user_picture($user, $useroptions);
|
||||
$user->fullname = fullname($user);
|
||||
$fieldvalues = array();
|
||||
foreach ($extrafields as $field) {
|
||||
|
@ -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…
x
Reference in New Issue
Block a user