[LON-CAPA-cvs] cvs: loncom /interface lonstatistics.pm
raeburn
lon-capa-cvs-allow@mail.lon-capa.org
Fri, 22 Feb 2008 18:19:39 -0000
raeburn Fri Feb 22 13:19:39 2008 EDT
Modified files:
/loncom/interface lonstatistics.pm
Log:
- Top level sequence was being included twice.
Index: loncom/interface/lonstatistics.pm
diff -u loncom/interface/lonstatistics.pm:1.138 loncom/interface/lonstatistics.pm:1.139
--- loncom/interface/lonstatistics.pm:1.138 Wed Jun 6 13:30:40 2007
+++ loncom/interface/lonstatistics.pm Fri Feb 22 13:19:38 2008
@@ -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.139 2008/02/22 18:19:38 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -707,8 +707,13 @@
#
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);
}