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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 10 Sep 2004 21:29:54 -0000


albertel		Fri Sep 10 17:29:54 2004 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
  Log:
   BUG#3075, name the blank sequence, and remove the suprious [] sequence
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.174 loncom/interface/lonparmset.pm:1.175
--- loncom/interface/lonparmset.pm:1.174	Fri Aug 27 17:10:05 2004
+++ loncom/interface/lonparmset.pm	Fri Sep 10 17:29:54 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.174 2004/08/27 21:10:05 albertel Exp $
+# $Id: lonparmset.pm,v 1.175 2004/09/10 21:29:54 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -581,6 +581,8 @@
 
     foreach (keys %$bighash) {
 	if ($_=~/^src\_(\d+)\.(\d+)$/) {
+	    # there are no resources in the 0 level
+	    if ($1 eq '0') { next; }
 	    my $mapid=$1;
 	    my $resid=$2;
 	    my $id=$mapid.'.'.$resid;
@@ -623,8 +625,12 @@
 		    &Apache::lonnet::declutter($$bighash{'map_id_'.$mapid});
                 $$mapp{$mapid}=$$mapp{$id};
 		$$allmaps{$mapid}=$$mapp{$id};
-		$$maptitles{$mapid}=
- $$bighash{'title_'.$$bighash{'ids_'.&Apache::lonnet::clutter($$mapp{$id})}};
+		if ($mapid eq '1') {
+		    $$maptitles{$mapid}='Main Course Documents';
+		} else {
+		    $$maptitles{$mapid}=
+			$$bighash{'title_'.$$bighash{'ids_'.&Apache::lonnet::clutter($$mapp{$id})}};
+		}
 		$$maptitles{$$mapp{$id}}=$$maptitles{$mapid};
 		$$symbp{$id}=$$mapp{$id}.
 			'___'.$resid.'___'.