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

matthew lon-capa-cvs@mail.lon-capa.org
Thu, 23 Sep 2004 14:46:04 -0000


matthew		Thu Sep 23 10:46:04 2004 EDT

  Modified files:              
    /loncom/interface	loncoursedata.pm 
  Log:
  modified &get_sequence_assessment_data to use $res->compTitle
  
  
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.138 loncom/interface/loncoursedata.pm:1.139
--- loncom/interface/loncoursedata.pm:1.138	Thu Jul 22 11:55:57 2004
+++ loncom/interface/loncoursedata.pm	Thu Sep 23 10:46:03 2004
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: loncoursedata.pm,v 1.138 2004/07/22 15:55:57 matthew Exp $
+# $Id: loncoursedata.pm,v 1.139 2004/09/23 14:46:03 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -155,14 +155,9 @@
                 next;
             }
             # get the map itself, instead of BEGIN_MAP
-            $title = $previous->title();
-            $title =~ s/\:/\&\#058;/g;
+            $title = $previous->compTitle;
             $symb  = $previous->symb();
             $src   = $previous->src();
-            # pick up the filename if there is no title available
-            if (! defined($title) || $title eq '') {
-                ($title) = ($src=~/\/([^\/]*)$/);
-            }
             $randompick = $previous->randompick();
             my $newmap = { title    => $title,
                            src      => $src,
@@ -184,14 +179,9 @@
         next if (! ref($curRes));
         next if (! $curRes->is_problem() && $curRes->src() !~ /\.survey$/);
         # Okay, from here on out we only deal with assessments
-        $title = $curRes->title();
-        $title =~ s/\:/\&\#058;/g;
+        $title = $curRes->compTitle();
         $symb  = $curRes->symb();
         $src   = $curRes->src();
-        # Grab the filename if there is not title available
-        if (! defined($title) || $title eq '') {
-            ($title) = ($src=~ m:/([^/]*)$:);
-        }
         my $parts = $curRes->parts();
         my %partdata;
         foreach my $part (@$parts) {