--- loncom/interface/lonstatistics.pm 2007/06/06 17:30:40 1.138 +++ loncom/interface/lonstatistics.pm 2008/09/16 12:32:18 1.140 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstatistics.pm,v 1.138 2007/06/06 17:30:40 albertel Exp $ +# $Id: lonstatistics.pm,v 1.140 2008/09/16 12:32:18 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -707,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); } @@ -1176,12 +1181,13 @@ ENDSTYLE # if (! &Apache::lonmysql::verify_sql_connection()) { my $serveradmin = $r->dir_config('lonAdmEMail'); - $r->print('
'. - &mt('Please notify the server administrator '). - ''.$serveradmin.'
'); + ''); + $r->print('' + .&mt('Please notify the server administrator [_1]', + ,''.$serveradmin.'') + .'
'); $r->print(''. &mt('Course Statistics and Charts cannot be '. 'retrieved until the database is restarted. '.