Index: lib/tablelib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/tablelib.php,v
retrieving revision 1.24.2.6
diff -u -r1.24.2.6 tablelib.php
--- lib/tablelib.php	8 Jan 2010 02:27:32 -0000	1.24.2.6
+++ lib/tablelib.php	18 Apr 2010 06:50:37 -0000
@@ -552,6 +552,7 @@
 
             // Bar of first initials
          
+            /* Remove first initials by Sunner
             echo '<div class="initialbar firstinitial">'.get_string('firstname').' : ';
             if(!empty($this->sess->i_first)) {
                 echo '<a href="'.$this->baseurl.$this->request[TABLE_VAR_IFIRST].'=">'.$strall.'</a>';
@@ -566,6 +567,7 @@
                 }
             }
             echo '</div>';
+            End by Sunner */
 
             // Bar of last initials
 
@@ -575,14 +577,24 @@
             } else {
                 echo '<strong>'.$strall.'</strong>';
             }
-            foreach ($alpha as $letter) {
+            $alphapinyin  = explode(',', get_string('alphabetpinyin', 'langconfig'));
+            $prevpy = '';
+
+            foreach ($alpha as $i => $letter) {
+                if ($alphapinyin[$i] != $prevpy) {
+                    if ($i != 0)
+                        echo ')';
+                    $prevpy = $alphapinyin[$i];
+                    echo "&nbsp;&nbsp; (<em>$prevpy</em>";
+                }
+
                 if (isset($this->sess->i_last) && $letter == $this->sess->i_last) {
                     echo ' <strong>'.$letter.'</strong>';
                 } else {
                     echo ' <a href="'.$this->baseurl.$this->request[TABLE_VAR_ILAST].'='.$letter.'">'.$letter.'</a>';
                 }
             }
-            echo '</div>';
+            echo ')</div>';
 
         }
 

