[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm
bisitz
bisitz@source.lon-capa.org
Tue, 30 Jun 2009 14:30:26 -0000
bisitz Tue Jun 30 14:30:26 2009 EDT
Modified files:
/loncom/interface lonparmset.pm
Log:
Corrections and Optimizations for Folder Display in Table Mode:
- Corrected data_table rows: now use correct sub routines
(tree view introduced in rev. 1.461; data_table introduced in rev. 1.462)
- Added missing label closure to "All Maps or Folders" row
- Added some code line breaks for better readability
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.462 loncom/interface/lonparmset.pm:1.463
--- loncom/interface/lonparmset.pm:1.462 Thu Jun 18 19:43:14 2009
+++ loncom/interface/lonparmset.pm Tue Jun 30 14:30:26 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.462 2009/06/18 19:43:14 neumanie Exp $
+# $Id: lonparmset.pm,v 1.463 2009/06/30 14:30:26 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1627,8 +1627,15 @@
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Enclosing Map or Folder')));
if ((ref($tree) eq 'ARRAY') && (ref($treeinfo) eq 'HASH')) {
my $icon = '<img src="/adm/lonIcons/navmap.folder.open.gif" alt="" />';
- $r->print(&Apache::loncommon::start_data_table().&Apache::loncommon::start_data_table_header_row());
- $r->print('<td>'.$icon.'<label> <input type="radio" name="pschp" checked="checked" value="all"/>'.&mt('All Maps or Folders').'</td>'.&Apache::loncommon::end_data_table_header_row());
+ $r->print(&Apache::loncommon::start_data_table()
+ .&Apache::loncommon::start_data_table_row()
+ .'<td>'.$icon
+ .'<label> '
+ .'<input type="radio" name="pschp" checked="checked" value="all" />'
+ .&mt('All Maps or Folders')
+ .'</label></td>'
+ .&Apache::loncommon::end_data_table_row()
+ );
foreach my $mapid (@{$tree}) {
my $depth = $treeinfo->{$mapid}->{'depth'};
my $indent = (' 'x$depth);
@@ -1636,11 +1643,21 @@
if ($treeinfo->{$mapid}->{'type'} eq 'page') {
$icon = '<img src="/adm/lonIcons/navmap.page.open.gif" alt="" />';
}
- $r->print(&Apache::loncommon::start_data_table_header_row().'<td>'.$indent.$icon.'<label> <input type ="radio" name="pschp" value="'.$mapid.'"');
+ $r->print(&Apache::loncommon::start_data_table_row()
+ .'<td>'.$indent.$icon
+ .'<label> '
+ .'<input type ="radio" name="pschp" value="'.$mapid.'"'
+ );
if ($pschp eq $mapid) {
$r->print(' checked="checked"');
}
- $r->print('/>'.$$maptitles{$mapid}.($$allmaps{$mapid}!~/^uploaded/?' ['.$$allmaps{$mapid}.']':'').'</label></td>'.&Apache::loncommon::end_data_table_header_row());
+ $r->print('/>'
+ .$$maptitles{$mapid}
+ .($$allmaps{$mapid}!~/^uploaded/?' ['.$$allmaps{$mapid}.']':'')
+ .'</label>'
+ .'</td>'
+ .&Apache::loncommon::end_data_table_row()
+ );
}
$r->print(&Apache::loncommon::end_data_table());
}