From 1d40c70b4310306bc2171d812d8726a878351389 Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Mon, 13 Nov 2006 03:43:12 +0000 Subject: [PATCH] fix for MDL-7483, add table header to user picture on participants listing --- lang/en_utf8/moodle.php | 1 + lib/tablelib.php | 4 ++++ user/index.php | 6 +++--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lang/en_utf8/moodle.php b/lang/en_utf8/moodle.php index 82119428bf..8da55c0895 100644 --- a/lang/en_utf8/moodle.php +++ b/lang/en_utf8/moodle.php @@ -1401,6 +1401,7 @@ $string['usernameemailmatch'] = 'The username and email address do not relate to $string['usernameexists'] = 'This username already exists, choose another'; $string['usernamenotfound'] = 'The username was not found in the database'; $string['usernotconfirmed'] = 'Could not confirm $a'; +$string['userpic'] = 'User picture'; $string['userprofilefor'] = 'User profile for $a'; $string['users'] = 'Users'; $string['usersnew'] = 'New users'; diff --git a/lib/tablelib.php b/lib/tablelib.php index 6de009e2b5..3a38aae3e3 100644 --- a/lib/tablelib.php +++ b/lib/tablelib.php @@ -487,6 +487,10 @@ class flexible_table { } break; + case 'userpic': + // do nothing, do not display sortable links + break; + default: if($this->is_sortable) { if($primary_sort_column == $column) { diff --git a/user/index.php b/user/index.php index d4373545bc..27d695dc51 100644 --- a/user/index.php +++ b/user/index.php @@ -274,8 +274,8 @@ /// Define a table showing a list of users in the current role selection - $tablecolumns = array('picture', 'fullname'); - $tableheaders = array('', get_string('fullname')); + $tablecolumns = array('userpic', 'fullname'); + $tableheaders = array(get_string('userpic'), get_string('fullname')); if (!isset($hiddenfields['city'])) { $tablecolumns[] = 'city'; $tableheaders[] = get_string('city'); @@ -304,7 +304,7 @@ $table->define_columns($tablecolumns); $table->define_headers($tableheaders); $table->define_baseurl($baseurl); - + $table->sortable(true, 'lastaccess', SORT_DESC); $table->set_attribute('cellspacing', '0'); -- 2.39.5