--- loncom/interface/lonstatistics.pm 2006/08/18 15:15:38 1.137 +++ loncom/interface/lonstatistics.pm 2008/02/22 18:19:38 1.139 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstatistics.pm,v 1.137 2006/08/18 15:15:38 raeburn Exp $ +# $Id: lonstatistics.pm,v 1.139 2008/02/22 18:19:38 raeburn 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 @@ -704,8 +707,13 @@ sub selected_sequences_with_assessments # my @sequences = $navmap->retrieveResources(undef, sub { shift->is_map(); },1,0,1); + my $toplevelseq = $navmap->getById('0.0'); + if (!grep(/^\Q$toplevelseq\E$/,@sequences)) { + unshift(@sequences,$toplevelseq); + } + my @sequences_with_assessments; - for my $sequence ($navmap->getById('0.0'), @sequences) { + foreach my $sequence (@sequences) { if ($navmap->hasResource($sequence,sub { shift->is_problem(); },0,1)){ push(@sequences_with_assessments,$sequence); }