Skip to content

Commit

Permalink
MDL-14832
Browse files Browse the repository at this point in the history
Don't show a user name more than once. Only show them in the
most 'senior' role.
  • Loading branch information
thepurpleblob committed May 21, 2008
1 parent b44bd7a commit 0c4c41b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions course/lib.php
Expand Up @@ -1883,7 +1883,16 @@ function print_course($course) {
$aliasnames = get_records('role_names', 'contextid', $context->id,'','roleid,contextid,name');
}

// keep a note of users displayed to eliminate duplicates
$usersshown = array();
foreach ($rusers as $ra) {

// if we've already displayed user don't again
if (in_array($ra->user->id,$usersshown)) {
continue;
}
$usersshown[] = $ra->user->id;

if ($ra->hidden == 0 || $canseehidden) {
$fullname = fullname($ra->user, $canviewfullnames);
if ($ra->hidden == 1) {
Expand Down

0 comments on commit 0c4c41b

Please sign in to comment.