Index: mod/glossary/lib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/glossary/lib.php,v
retrieving revision 1.191
diff -u -r1.191 lib.php
--- mod/glossary/lib.php	18 Sep 2007 18:38:06 -0000	1.191
+++ mod/glossary/lib.php	19 Sep 2007 16:34:51 -0000
@@ -1444,15 +1444,19 @@
     $bclose = '</b>';
 
      $neworder = '';
+     $currentorder = '';
+     $currentsort = '';
      if ( $sortorder ) {
          if ( $sortorder == 'asc' ) {
+             $currentorder = $asc;
              $neworder = '&amp;sortorder=desc';
-             $newordertitle = $desc;
+             $newordertitle = get_string('changeto', 'glossary', $desc);
          } else {
+             $currentorder = $desc;
              $neworder = '&amp;sortorder=asc';
-             $newordertitle = $asc;
+             $newordertitle = get_string('changeto', 'glossary', $asc);
          }
-         $icon = " <img src=\"$sortorder.gif\" class=\"icon\" alt=\"". get_string($sortorder)."\" />";
+         $icon = " <img src=\"$sortorder.gif\" class=\"icon\" alt=\"$newordertitle\" />";
      } else {
          if ( $sortkey != 'CREATION' and $sortkey != 'UPDATE' and
                $sortkey != 'FIRSTNAME' and $sortkey != 'LASTNAME' ) {
@@ -1461,7 +1465,7 @@
          } else {
              $newordertitle = $desc;
              $neworder = '&amp;sortorder=desc';
-             $icon = ' <img src="asc.gif" border="0" class="icon" alt="" />';
+             $icon = ' <img src="asc.gif" class="icon" alt="'.$newordertitle.'" />';
          }
      }
      $ficon     = '';
@@ -1504,6 +1508,10 @@
          $fsort  = get_string("sortbycreation", "glossary");
          $ssort  = get_string("sortbylastupdate", "glossary");
 
+         $currentsort = $fsort;
+         if ($sortkey == 'UPDATE') {
+             $currentsort = $ssort;
+         }
          $sort        = get_string("sortchronogically", "glossary");
      } elseif ( $sortkey == 'FIRSTNAME' or $sortkey == 'LASTNAME') {
          $forder = 'FIRSTNAME';
@@ -1511,10 +1519,14 @@
          $fsort  = get_string("firstname");
          $ssort  = get_string("lastname");
 
+         $currentsort = $fsort;
+         if ($sortkey == 'LASTNAME') {
+             $currentsort = $ssort;
+         }
          $sort        = get_string("sortby", "glossary");
      }
-
-     echo "<br />$sort: $sbtag<a title=\"$ssort $sordertitle\" href=\"$CFG->wwwroot/mod/glossary/view.php?id=$cm->id&amp;sortkey=$sorder$sneworder&amp;mode=$mode\">$ssort$sicon</a>$sendbtag | ".
+     $current = '<span class="accesshide">'.get_string('current', 'glossary', "$currentsort $currentorder").'</span>';
+     echo "<br />$current $sort: $sbtag<a title=\"$ssort $sordertitle\" href=\"$CFG->wwwroot/mod/glossary/view.php?id=$cm->id&amp;sortkey=$sorder$sneworder&amp;mode=$mode\">$ssort$sicon</a>$sendbtag | ".
                           "$fbtag<a title=\"$fsort $fordertitle\" href=\"$CFG->wwwroot/mod/glossary/view.php?id=$cm->id&amp;sortkey=$forder$fneworder&amp;mode=$mode\">$fsort$ficon</a>$fendbtag<br />";
 }
 
Index: lang/en_utf8/glossary.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lang/en_utf8/glossary.php,v
retrieving revision 1.7
diff -u -r1.7 glossary.php
--- lang/en_utf8/glossary.php	4 Apr 2007 03:35:24 -0000	1.7
+++ lang/en_utf8/glossary.php	19 Sep 2007 16:34:50 -0000
@@ -17,7 +17,7 @@
 $string['areyousuredelete'] = 'Are you sure you want to delete this entry?';
 $string['areyousuredeletecomment'] = 'Are you sure you want to delete this comment?';
 $string['areyousureexport'] = 'Are you sure you want to export this entry to';
-$string['ascending'] = '(ascending)';
+$string['ascending'] = 'ascending';
 $string['attachment'] = 'Attachment';
 $string['authorview'] = 'Browse by Author';
 $string['back'] = 'Back';
@@ -52,6 +52,8 @@
 $string['concepts'] = 'Concepts';
 $string['configenablerssfeeds'] = 'This switch will enable the possibility of RSS feeds for all glosaries.  You will still need to turn feeds on manually in the settings for each glossary.';
 $string['currentglossary'] = 'Current glossary';
+$string['changeto'] = 'change to $a';
+$string['current']= 'Currently sorted $a';
 $string['errconceptalreadyexists'] = 'This concept already exists. No duplicates allowed in this glossary.';
 $string['erredittimeexpired'] = 'The editing time for this entry has expired.';
 $string['errcannoteditothers'] = 'You cannot edit other people\'s entries.';
@@ -62,7 +64,7 @@
 $string['deleteentry'] = 'Delete entry';
 $string['deletingcomment'] = 'Deleting comment';
 $string['deletingnoneemptycategory'] = 'Deleting this category will not delete the entries it contains - they will be marked as uncategorised.';
-$string['descending'] = '(descending)';
+$string['descending'] = 'descending';
 $string['destination'] = 'Destination';
 $string['displayformat'] = 'Display format';
 $string['displayformatcontinuous'] = 'Continuous without author';
