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

matthew lon-capa-cvs@mail.lon-capa.org
Fri, 28 Feb 2003 20:41:28 -0000


matthew		Fri Feb 28 15:41:28 2003 EDT

  Modified files:              
    /loncom/interface	loncoursedata.pm 
  Log:
  &get_sequence_assessment_data:
      Added 'num_assess_parts' to sequence data structure
      Added 'parts' and 'num_parts' to assessment data structure
      Cleaned up POD a little bit.
  
  
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.52 loncom/interface/loncoursedata.pm:1.53
--- loncom/interface/loncoursedata.pm:1.52	Tue Feb 25 15:36:29 2003
+++ loncom/interface/loncoursedata.pm	Fri Feb 28 15:41:27 2003
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: loncoursedata.pm,v 1.52 2003/02/25 20:36:29 matthew Exp $
+# $Id: loncoursedata.pm,v 1.53 2003/02/28 20:41:27 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -280,7 +280,6 @@
   source => '/s/o/u/r/c/e',
   type  => (container|assessment),
   num_assess   => 2,               # only for container
-  contents     => [ {},{},{},{} ], # only for container
   parts        => [11,13,15],      # only for assessment
   response_ids => [12,14,16],      # only for assessment
   contents     => [........]       # only for container
@@ -324,6 +323,7 @@
                 symb     => $symb,
                 type     => 'container',
                 num_assess => 0,
+                num_assess_parts => 0,
                 contents   => [], };
     push (@Sequences,$top);
     push (@Nested_Sequences, $top);
@@ -369,10 +369,13 @@
                            src   => $src,
                            symb  => $symb,
                            type  => 'assessment',
+                           parts => $parts,
+                           num_parts => scalar(@$parts),
                        };
         push(@Assessments,$assessment);
         push(@{$currentmap->{'contents'}},$assessment);
         $currentmap->{'num_assess'}++;
+        $currentmap->{'num_assess_parts'}+= scalar(@$parts);
     }
     return ($top,\@Sequences,\@Assessments);
 }