Forgot to prepend country codes to the teacher list as well when sorting.

This commit is contained in:
defacer 2005-06-03 23:40:19 +00:00
parent 113130bd32
commit 94640580f3

View file

@ -194,6 +194,7 @@
print_user($teacher, $course);
}
} else {
$countrysort = (strpos($sortclause, 'country') !== false);
foreach ($teachers as $teacher) {
if ($teacher->lastaccess) {
@ -202,12 +203,24 @@
$lastaccess = $strnever;
}
if (empty($teacher->country)) {
$country = '';
}
else {
if($countrysort) {
$country = '('.$teacher->country.') '.$countries[$teacher->country];
}
else {
$country = $countries[$teacher->country];
}
}
$table->add_data(array (
//'<input type="checkbox" name="userid[]" value="'.$teacher->id.'" />',
print_user_picture($teacher->id, $course->id, $teacher->picture, false, true),
'<strong><a href="'.$CFG->wwwroot.'/user/view.php?id='.$teacher->id.'&amp;course='.$course->id.'">'.fullname($teacher, $isteacher).'</a></strong>',
$teacher->city,
$teacher->country ? $countries[$teacher->country] : '',
$country,
$lastaccess));
}