[LON-CAPA-cvs] cvs: loncom /interface loncoursedata.pm

matthew lon-capa-cvs@mail.lon-capa.org
Tue, 25 Feb 2003 20:36:29 -0000


matthew		Tue Feb 25 15:36:29 2003 EDT

  Modified files:              
    /loncom/interface	loncoursedata.pm 
  Log:
  &get_sequence_assessment_data() handles top level map better:
     title is set to course description
     symb is set to 'top'
     src is set (which is new) to 'not applicable' (which is stupid)
  
  
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.51 loncom/interface/loncoursedata.pm:1.52
--- loncom/interface/loncoursedata.pm:1.51	Tue Feb 25 11:05:24 2003
+++ loncom/interface/loncoursedata.pm	Tue Feb 25 15:36:29 2003
@@ -1,7 +1,6 @@
 # The LearningOnline Network with CAPA
-# (Publication Handler
 #
-# $Id: loncoursedata.pm,v 1.51 2003/02/25 16:05:24 matthew Exp $
+# $Id: loncoursedata.pm,v 1.52 2003/02/25 20:36:29 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -313,17 +312,15 @@
     ## We are going to loop until we run out of sequences/pages to explore for
     ## resources.  This means we have to start out with something to look
     ## at.
-    my $curRes = $iterator->next(); # BEGIN_MAP
-    $curRes = $iterator->next(); # The sequence itself
-    #
-    my $title = $curRes->title();
-    my $symb  = $curRes->symb();
-    my $src   = $curRes->src();
+    my $title = $ENV{'course.'.$ENV{'request.course.id'}.'.description'};
+    my $symb  = 'top';
+    my $src   = 'not applicable';
     #
     my @Sequences; 
     my @Assessments;
     my @Nested_Sequences = ();   # Stack of sequences, keeps track of depth
     my $top = { title    => $title,
+                src      => $src,
                 symb     => $symb,
                 type     => 'container',
                 num_assess => 0,
@@ -333,7 +330,9 @@
     #
     # We need to keep track of which sequences contain homework problems
     # 
-    my $previous = $top;
+    my $previous;
+    my $curRes = $iterator->next(); # BEGIN_MAP
+    $curRes = $iterator->next(); # The first item in the top level map.
     while (scalar(@Nested_Sequences)) {
         $previous = $curRes;
         $curRes = $iterator->next();