[LON-CAPA-cvs] cvs: loncom(version_1_1_X) /homework structuretags.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 30 Jan 2004 16:22:52 -0000


albertel		Fri Jan 30 11:22:52 2004 EDT

  Modified files:              (Branch: version_1_1_X)
    /loncom/homework	structuretags.pm 
  Log:
  - backport 1.230
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.227 loncom/homework/structuretags.pm:1.227.2.1
--- loncom/homework/structuretags.pm:1.227	Wed Nov 26 14:35:28 2003
+++ loncom/homework/structuretags.pm	Fri Jan 30 11:22:52 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.227 2003/11/26 19:35:28 albertel Exp $
+# $Id: structuretags.pm,v 1.227.2.1 2004/01/30 16:22:52 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -454,7 +454,7 @@
 	    my @packages = split /,/,$packages;
 	    my $allow_print_points = 0;
 	    foreach my $partial_key (@packages) {
-		if ($partial_key=~m/part_0/) {
+		if ($partial_key=~m/^part_0$/) {
 		    $allow_print_points=1;
 		}
 	    }
@@ -969,11 +969,11 @@
 			$result.='\noindent \end{minipage}\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent';
 		    }
 		    my $weight = &Apache::lonnet::EXT("resource.$id.weight");
-		    my $allkeys=&Apache::lonnet::metadata($ENV{'request.uri'},'keys');
+		    my $allkeys=&Apache::lonnet::metadata($ENV{'request.uri'},'packages');
 		    my @allkeys = split /,/,$allkeys;
 		    my $allow_print_points = 0;
 		    foreach my $partial_key (@allkeys) {
-			if ($partial_key=~m/\_(\d*)\_weight/) {
+			if ($partial_key=~m/^part_(.*)$/) {
 			    if ($1 ne '0') {$allow_print_points=1;}
 			}
 		    }