--- loncom/homework/structuretags.pm 2003/11/04 14:46:28 1.222 +++ loncom/homework/structuretags.pm 2003/11/04 20:09:18 1.223 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.222 2003/11/04 14:46:28 sakharuk Exp $ +# $Id: structuretags.pm,v 1.223 2003/11/04 20:09:18 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -457,12 +457,12 @@ sub start_problem { } my $id = $Apache::inputtags::part; my $weight = &Apache::lonnet::EXT("resource.$id.weight"); - my $allkeys=&Apache::lonnet::metadata($ENV{'request.uri'},'keys'); - my @allkeys = split /,/,$allkeys; - my $allow_print_points = 1; - foreach my $partial_key (@allkeys) { - if ($partial_key=~m/\_(\d*)\_weight/) { - if ($1 ne '0') {$allow_print_points=0;} + my $packages=&Apache::lonnet::metadata($ENV{'request.uri'},'packages'); + my @packages = split /,/,$packages; + my $allow_print_points = 0; + foreach my $partial_key (@packages) { + if ($partial_key=~m/part_0/) { + $allow_print_points=1; } } my $duedate = &Apache::lonnet::EXT("resource.$id.duedate");