--- loncom/interface/lonparmset.pm 2007/08/02 00:42:43 1.373 +++ loncom/interface/lonparmset.pm 2007/08/07 23:56:34 1.375 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.373 2007/08/02 00:42:43 albertel Exp $ +# $Id: lonparmset.pm,v 1.375 2007/08/07 23:56:34 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -944,7 +944,7 @@ sub extractResourceInformation { # allparms is a hash of parameter names # my $name=&Apache::lonnet::metadata($srcf,$key.'.name'); - if (!exists($$allparms{$name})) { + if (!exists($$allparms{$name}) || $$allparms{$name} =~ m/^\s*$/ ) { my $display= &Apache::lonnet::metadata($srcf,$key.'.display'); my $parmdis = $display; $parmdis =~ s/\[Part.*$//g; @@ -1081,7 +1081,9 @@ ENDSCRIPT if ($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat}) { $r->print(' checked'); } - $r->print('>'.$$allparms{$tempkey}.''); + $r->print('>'.($$allparms{$tempkey}=~/\S/ ? $$allparms{$tempkey} + : $tempkey) + .''); $cnt++; if ($cnt==3) { $r->print("\n"); @@ -2727,8 +2729,8 @@ ENDOVER my @selected_sections = &Apache::loncommon::get_env_multiple('form.Section'); @selected_sections = ('all') if (! @selected_sections); - foreach (@selected_sections) { - if ($_ eq 'all') { + foreach my $sec (@selected_sections) { + if ($sec eq 'all') { @selected_sections = ('all'); } } @@ -2748,6 +2750,9 @@ ENDOVER \%mapp, \%symbp,\%maptitles,\%uris, \%keyorder,\%defkeytype); + if (grep {$_ eq 'all'} (@psprt)) { + @psprt = keys(%allparts); + } # Menu to select levels, etc $r->print('