--- loncom/interface/lonstatistics.pm	2006/05/30 12:46:09	1.136
+++ loncom/interface/lonstatistics.pm	2007/06/06 17:30:40	1.138
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstatistics.pm,v 1.136 2006/05/30 12:46:09 www Exp $
+# $Id: lonstatistics.pm,v 1.138 2007/06/06 17:30:40 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -76,7 +76,6 @@ use Apache::lonpercentage;
 use Apache::lonstudentsubmissions();
 use Apache::lonsurveyreports();
 use Apache::longradinganalysis();
-use lib '/home/httpd/lib/perl/';
 use LONCAPA;
 
 #######################################################
@@ -313,7 +312,11 @@ sub PrepareClasslist {
     if ($env{'request.course.sec'} !~ /^\s*$/) {
         @Sections = ($env{'request.course.sec'});
     } else {
-        @Sections = sort {$a cmp $b} keys(%Sections);
+        @Sections = sort {
+	    if ($a == $a && $b == $b ) { return $a <=> $b; }
+	    return $a cmp $b;
+	} keys(%Sections);
+
         unshift(@Sections,'all'); # Put 'all' at the front of the list
     }
     # Sort the groups
@@ -432,7 +435,7 @@ sub get_selected_groups {
 =item &section_and_enrollment_description
 
 Returns a string describing the currently selected section(s), group(s) and 
-enrollment status.  
+access status.  
 
 Inputs: mode = 'plaintext' or 'localized'  (defaults to 'localized')
     'plaintext' is used for example in Excel spreadsheets.
@@ -449,9 +452,9 @@ sub section_and_enrollment_description {
     my @groups = &Apache::lonstatistics::get_selected_groups();
     my $description;
     if ($mode eq 'localized') {
-        $description = &mt('Unable to determine section, groups and enrollment');
+        $description = &mt('Unable to determine section, groups and access status');
     } elsif ($mode eq 'plaintext') {
-        $description = 'Unable to determine section, groups and enrollment';
+        $description = 'Unable to determine section, groups and access status';
     } else {
         $description = 'Bad parameter passed to lonstatistics::section_and_enrollment_description';
         &Apache::lonnet::logthis($description);
@@ -459,9 +462,9 @@ sub section_and_enrollment_description {
     $description = &section_or_group_text($mode,'section',@sections).
 	' '.&section_or_group_text($mode,'group',@groups);
     if ($mode eq 'localized') {
-        $description .= &mt(' [_1] enrollment status.',$env{'form.Status'});
+        $description .= &mt(' [_1] access status.',$env{'form.Status'});
     } elsif ($mode eq 'plaintext') {
-        $description .= ' '.$env{'form.Status'}.' enrollment status.';
+        $description .= ' '.$env{'form.Status'}.' access status.';
     }
     return $description;
 }
@@ -931,7 +934,7 @@ sub DisplayClasslist {
     $Str .= '<tr>';
     $Str .= '<th align="center"><b>'.&mt('Sections').'</b></th>';
     $Str .= '<th align="center"><b>'.&mt('Groups').'</b></th>';
-    $Str .= '<th align="center"><b>'.&mt('Enrollment Status').'</b></th>';
+    $Str .= '<th align="center"><b>'.&mt('Access Status').'</b></th>';
     $Str .= '</tr>'.$/;
     $Str .= '<tr>';
     $Str .= '<td>'.