--- loncom/interface/lonparmset.pm 2009/06/17 20:01:57 1.461 +++ loncom/interface/lonparmset.pm 2009/06/30 14:30:26 1.463 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.461 2009/06/17 20:01:57 neumanie Exp $ +# $Id: lonparmset.pm,v 1.463 2009/06/30 14:30:26 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1612,19 +1612,30 @@ sub mapmenu { } my $id= $curRes->id(); my ($mapid,$resid)=split(/\./,$id); - push(@$tree,$mapid); - $treeinfo->{$mapid} = { + if(!exists($treeinfo->{$mapid})) { + push(@$tree,$mapid); + $treeinfo->{$mapid} = { depth => $depth, type => $type, }; + } } } } - } + } + $r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Enclosing Map or Folder'))); if ((ref($tree) eq 'ARRAY') && (ref($treeinfo) eq 'HASH')) { my $icon = ''; - $r->print(''); + $r->print(&Apache::loncommon::start_data_table() + .&Apache::loncommon::start_data_table_row() + .'' + .&Apache::loncommon::end_data_table_row() + ); foreach my $mapid (@{$tree}) { my $depth = $treeinfo->{$mapid}->{'depth'}; my $indent = (' 'x$depth); @@ -1632,13 +1643,23 @@ sub mapmenu { if ($treeinfo->{$mapid}->{'type'} eq 'page') { $icon = ''; } - $r->print(''); + $r->print('/>' + .$$maptitles{$mapid} + .($$allmaps{$mapid}!~/^uploaded/?' ['.$$allmaps{$mapid}.']':'') + .'' + .'' + .&Apache::loncommon::end_data_table_row() + ); } - $r->print('
'.$icon.'
'.$icon + .'
'.$indent.$icon.''.$indent.$icon + .'
'); + $r->print(&Apache::loncommon::end_data_table()); } }