~ubuntu-branches/ubuntu/utopic/moodle/utopic

« back to all changes in this revision

Viewing changes to report/log/locallib.php

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-05-12 16:10:38 UTC
  • mfrom: (36.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140512161038-puyqf65k4e0s8ytz
Tags: 2.6.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
 
140
140
    // If looking at a different host, we're interested in all our site users
141
141
    if ($hostid == $CFG->mnet_localhost_id && $course->id != SITEID) {
142
 
        $courseusers = get_enrolled_users($context, '', $selectedgroup, 'u.id, u.firstname, u.lastname, u.idnumber', null, $limitfrom, $limitnum);
 
142
        $courseusers = get_enrolled_users($context, '', $selectedgroup, 'u.id, ' . get_all_user_name_fields(true, 'u'),
 
143
                null, $limitfrom, $limitnum);
143
144
    } else {
144
145
        // this may be a lot of users :-(
145
 
        $courseusers = $DB->get_records('user', array('deleted'=>0), 'lastaccess DESC', 'id, firstname, lastname, idnumber', $limitfrom, $limitnum);
 
146
        $courseusers = $DB->get_records('user', array('deleted'=>0), 'lastaccess DESC', 'id, ' . get_all_user_name_fields(true),
 
147
                $limitfrom, $limitnum);
146
148
    }
147
149
 
148
150
    if (count($courseusers) < COURSE_MAX_USERS_PER_DROPDOWN && !$showusers) {
233
235
            }
234
236
            $section = $cm->sectionnum;
235
237
            $modname = strip_tags($cm->get_formatted_name());
236
 
            if (textlib::strlen($modname) > 55) {
237
 
                $modname = textlib::substr($modname, 0, 50)."...";
 
238
            if (core_text::strlen($modname) > 55) {
 
239
                $modname = core_text::substr($modname, 0, 50)."...";
238
240
            }
239
241
            if (!$cm->visible) {
240
242
                $modname = "(".$modname.")";
450
452
    $limitfrom = empty($showusers) ? 0 : '';
451
453
    $limitnum  = empty($showusers) ? COURSE_MAX_USERS_PER_DROPDOWN + 1 : '';
452
454
 
453
 
    $courseusers = get_enrolled_users($context, '', $selectedgroup, 'u.id, u.firstname, u.lastname', null, $limitfrom, $limitnum);
 
455
    $courseusers = get_enrolled_users($context, '', $selectedgroup, 'u.id, ' . get_all_user_name_fields(true, 'u'),
 
456
            null, $limitfrom, $limitnum);
454
457
 
455
458
    if (count($courseusers) < COURSE_MAX_USERS_PER_DROPDOWN && !$showusers) {
456
459
        $showusers = 1;
495
498
            }
496
499
            $section = $cm->sectionnum;
497
500
            $modname = strip_tags($cm->get_formatted_name());
498
 
            if (textlib::strlen($modname) > 55) {
499
 
                $modname = textlib::substr($modname, 0, 50)."...";
 
501
            if (core_text::strlen($modname) > 55) {
 
502
                $modname = core_text::substr($modname, 0, 50)."...";
500
503
            }
501
504
            if (!$cm->visible) {
502
505
                $modname = "(".$modname.")";