--- loncom/interface/lonmsg.pm 2005/02/02 21:35:16 1.133 +++ loncom/interface/lonmsg.pm 2005/02/17 04:02:47 1.135 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging # -# $Id: lonmsg.pm,v 1.133 2005/02/02 21:35:16 www Exp $ +# $Id: lonmsg.pm,v 1.135 2005/02/17 04:02:47 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -693,7 +693,15 @@ ENDDISHEADER } } $r->print(''); - while (my ($student,$info) = each(%$classlist)) { + my $sort = sub { + my $aname=lc($classlist->{$a}[&Apache::loncoursedata::CL_FULLNAME()]); + if (!$aname) { $aname=$a; } + my $bname=lc($classlist->{$b}[&Apache::loncoursedata::CL_FULLNAME()]); + if (!$bname) { $bname=$b; } + return $aname cmp $bname; + }; + foreach my $student (sort $sort (keys(%{$classlist}))) { + my $info=$classlist->{$student}; my ($sname,$sdom,$status,$fullname,$section) = (@{$info}[&Apache::loncoursedata::CL_SNAME(), &Apache::loncoursedata::CL_SDOM(), @@ -979,9 +987,9 @@ ENDDISHEADER } $r->print(''); + $r->print(''.&mt('Status').''); } else { - $r->print(''.&mt('Status').''); + $r->print(''.&mt('Status').''); } $r->print("\n"); for (my $n=$firstdis;$n<=$lastdis;$n++) { @@ -996,10 +1004,10 @@ ENDDISHEADER } else { $r->print(''); } - $r->print(''. + '">'.&mt('Delete'):' ').''. '
'); if ($ENV{'form.sortedby'} eq "revstatus") { - $r->print(''.&mt('Status').'
'.&mt('Open').''. ($folder ne 'trash'?''.&mt('Delete'):' ').''.&Apache::lonlocal::locallocaltime($sendtime).''. $fromname.''.$fromdomain.''. &Apache::lonnet::unescape($shortsubj).''.