--- loncom/interface/lonparmset.pm 2003/09/03 21:24:32 1.121 +++ loncom/interface/lonparmset.pm 2003/09/04 01:09:04 1.122 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.121 2003/09/03 21:24:32 www Exp $ +# $Id: lonparmset.pm,v 1.122 2003/09/04 01:09:04 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1672,7 +1672,6 @@ sub overview { 'Set/Modify Course Assessment Parameters'); my $dom = $ENV{'course.'.$ENV{'request.course.id'}.'.domain'}; my $crs = $ENV{'course.'.$ENV{'request.course.id'}.'.num'}; - my %resourcedata=&Apache::lonnet::dump('resourcedata',$dom,$crs); $r->print(< @@ -1682,8 +1681,43 @@ $bodytag
ENDOVER - foreach (sort keys %resourcedata) { - $r->print($_.' - '.$resourcedata{$_}.'
'); +# Read and display + my %resourcedata=&Apache::lonnet::dump('resourcedata',$dom,$crs); + my $oldsection=''; + my $oldrealm=''; + my $oldpart=''; + foreach my $thiskey (sort keys %resourcedata) { + my ($course,$middle,$part,$name)= + ($thiskey=~/^(\w+)\.(.*)\.*([\w\s]+)\.(\w+)$/); + unless ($name eq 'type') { + my $section='All Students'; + if ($middle=~/^\[(.*)\]\./) { + $section='Group/Section: '.$1; + $middle=~s/^\[(.*)\]\.//; + } + my $realm='All Resources'; + if ($middle=~/^(.+)\_\_\_\(all\)$/) { + $realm='Folder/Map: '.$1; + } elsif ($middle) { + $realm='Resource: '.$middle; + } + if ($section ne $oldsection) { + $r->print("\n

$section

"); + $oldsection=$section; + $oldrealm=''; + } + if ($realm ne $oldrealm) { + $r->print("\n

$realm

"); + $oldrealm=$realm; + $oldpart=''; + } + if ($part ne $oldpart) { + $r->print("\n

Part: $part

"); + $oldpart=$part; + } + + $r->print('
'.$name.': '.$thiskey.' = '.$resourcedata{$thiskey}); + } } $r->print('
'); }