From: toyomoyo Date: Wed, 6 Dec 2006 03:46:04 +0000 (+0000) Subject: fix for MDL-7507. participants list, fix links to ordering links, added accesshide... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=49108746a9a581e1ff75321422e53d08f7777bf9;p=moodle.git fix for MDL-7507. participants list, fix links to ordering links, added accesshide texts to links --- diff --git a/lib/tablelib.php b/lib/tablelib.php index a481e4ad88..1d5455aa85 100644 --- a/lib/tablelib.php +++ b/lib/tablelib.php @@ -467,23 +467,32 @@ class flexible_table { if($this->is_sortable) { $icon_sort_first = $icon_sort_last = ''; if($primary_sort_column == 'firstname') { + $lsortorder = get_string('asc'); if($primary_sort_order == SORT_ASC) { $icon_sort_first = ' '.get_string('asc').''; + $fsortorder = get_string('asc'); } else { $icon_sort_first = ' '.get_string('desc').''; + $fsortorder = get_string('desc'); } } else if($primary_sort_column == 'lastname') { + $fsortorder = get_string('asc'); if($primary_sort_order == SORT_ASC) { $icon_sort_last = ' '.get_string('asc').''; + $lsortorder = get_string('asc'); } else { $icon_sort_last = ' '.get_string('desc').''; + $lsortorder = get_string('desc'); } + } else { + $fsortorder = get_string('asc'); + $lsortorder = get_string('asc'); } - $this->headers[$index] = ''.get_string('firstname').' '.$icon_sort_first.' / '. - ''.get_string('lastname').' '.$icon_sort_last; + $this->headers[$index] = ''.get_string('firstname').''.get_string('sortby').' '.get_string('firstname').' '.$fsortorder.' '.$icon_sort_first.' / '. + ''.get_string('lastname').''.get_string('sortby').' '.get_string('lastname').' '.$lsortorder.' '.$icon_sort_last; } break; @@ -496,12 +505,16 @@ class flexible_table { if($primary_sort_column == $column) { if($primary_sort_order == SORT_ASC) { $icon_sort = ' '.get_string('asc').''; + $localsortorder = get_string('asc'); } else { $icon_sort = ' '.get_string('desc').''; + $localsortorder = get_string('desc'); } + } else { + $localsortorder = get_string('asc'); } - $this->headers[$index] = ''.$this->headers[$index].''; + $this->headers[$index] = ''.$this->headers[$index].''.get_string('sortby').' '.$this->headers[$index].' '.$localsortorder.''; } }