From db16ac502ab0d853bf69ea286e6241f88e8df68e Mon Sep 17 00:00:00 2001 From: jamiesensei Date: Fri, 29 Aug 2008 06:03:02 +0000 Subject: [PATCH] MDL-16126 "Altering the number of students shown can lead to students being inadvertently hidden" make sure that initials bar is shown if we are filtering by initials. --- lib/tablelib.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/tablelib.php b/lib/tablelib.php index 0da006d915..bdca620a86 100644 --- a/lib/tablelib.php +++ b/lib/tablelib.php @@ -752,7 +752,8 @@ class flexible_table { * This function is not part of the public api. */ function print_initials_bar(){ - if($this->use_initials && isset($this->columns['fullname'])) { + if (($this->sess->i_last || $this->sess->i_first || $this->use_initials) + && isset($this->columns['fullname'])) { $strall = get_string('all'); $alpha = explode(',', get_string('alphabet')); @@ -798,10 +799,7 @@ class flexible_table { * This function is not part of the public api. */ function print_nothing_to_display(){ - if ($this->get_initial_first()||$this->get_initial_last()){ - // Do we need to print initial bars? - $this->print_initials_bar(); - } + $this->print_initials_bar(); print_heading(get_string('nothingtodisplay')); } -- 2.39.5