--- loncom/homework/structuretags.pm 2004/01/15 03:44:01 1.229 +++ loncom/homework/structuretags.pm 2004/01/30 16:21:26 1.230 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.229 2004/01/15 03:44:01 www Exp $ +# $Id: structuretags.pm,v 1.230 2004/01/30 16:21:26 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -459,7 +459,7 @@ sub start_problem { 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; } } @@ -974,11 +974,11 @@ sub start_part { $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;} } }