[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm
bisitz
bisitz@source.lon-capa.org
Fri, 18 Jun 2010 11:11:09 -0000
bisitz Fri Jun 18 11:11:09 2010 EDT
Modified files:
/loncom/interface lonparmset.pm
Log:
Table Mode/Overview Mode, Folder/Map selection:
- Bug 6315: Only allow parametrisation for folders/maps which can be currently parameterized.
- Consistent layout: Radio buttons in first column
- Separator line between "All Maps or Folders" and the folders/maps list
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.497 loncom/interface/lonparmset.pm:1.498
--- loncom/interface/lonparmset.pm:1.497 Wed Jun 16 14:26:18 2010
+++ loncom/interface/lonparmset.pm Fri Jun 18 11:11:08 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.497 2010/06/16 14:26:18 bisitz Exp $
+# $Id: lonparmset.pm,v 1.498 2010/06/18 11:11:08 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1741,35 +1741,49 @@
.&Apache::loncommon::lonhttpdurl('/adm/lonIcons/whitespace_21.gif')
.'" alt="" />';
+ # Info about selectable folders/maps
+ $r->print(
+ '<div class="LC_info">'
+ .&mt('You can only select those maps and folders which can be currently parameterized.')
+ # .' '.&Apache::loncommon::help_open_topic('...') # Later: Add further help
+ .'</div>'
+ );
+
+
$r->print(&Apache::loncommon::start_data_table());
- # Display row: "All Maps and Folders"
- $r->print(&Apache::loncommon::start_data_table_row()
- .'<td>'.$icon
- .'<label>'
- .'<input type="radio" name="pschp"'
+ # Display row: "All Maps or Folders"
+ $r->print(
+ &Apache::loncommon::start_data_table_row()
+ .'<td>'
+ .'<label>'
+ .'<input type="radio" name="pschp"'
);
$r->print(' checked="checked"') if ($pschp eq 'all' || !$pschp);
- $r->print( ' value="all" />'
- .&mt('All Maps or Folders')
- .'</label></td>'
- .&Apache::loncommon::end_data_table_row()
+ $r->print(
+ ' value="all" /> '.$icon.' '
+ .&mt('All Maps or Folders')
+ .'</label>'
+ .'<hr /></td>'
+ .&Apache::loncommon::end_data_table_row()
);
# Display row: "Main Course Documents"
if (exists($$allmaps{1})) {
- $r->print(&Apache::loncommon::start_data_table_row()
- .'<td>'.$icon
- .'<label>'
- .'<input type="radio" name="pschp" value="1"'
+ $r->print(
+ &Apache::loncommon::start_data_table_row()
+ .'<td>'
+ .'<label>'
+ .'<input type="radio" name="pschp" value="1"'
);
$r->print(' checked="checked"') if ($pschp eq '1');
- $r->print('/>'
- .$$maptitles{1}
- .($$allmaps{1} !~/^uploaded/?' ['.$$allmaps{1}.']':'')
- .'</label>'
- .'</td>'
- .&Apache::loncommon::end_data_table_row()
+ $r->print(
+ '/> '.$icon.' '
+ .$$maptitles{1}
+ .($$allmaps{1} !~/^uploaded/?' ['.$$allmaps{1}.']':'')
+ .'</label>'
+ .'</td>'
+ .&Apache::loncommon::end_data_table_row()
);
}
@@ -1789,22 +1803,29 @@
my $symb_name = $$symbp{$id};
my ($front, $tail) = split (/___${resid}___/, $symb_name);
$symb_name = $tail;
- $r->print(&Apache::loncommon::start_data_table_row()
- .'<td>'.$indent.$icon
- .'<label>'
- .'<input type ="radio" name="pschp" value="'.$allmaps_inverted{$symb_name}.'"'
+ $r->print(
+ &Apache::loncommon::start_data_table_row()
+ .'<td>'
+ .'<label>'
);
- if ($allmaps_inverted{$symb_name} && $pschp) {
- if ($allmaps_inverted{$symb_name} eq $pschp) {
- $r->print(' checked="checked"');
- }
+ # Only offer radio button for folders/maps which can be parameterized
+ if ($allmaps_inverted{$symb_name}) {
+ $r->print(
+ '<input type ="radio" name="pschp"'
+ .' value="'.$allmaps_inverted{$symb_name}.'"'
+ );
+ $r->print(' checked="checked"') if ($allmaps_inverted{$symb_name} eq $pschp);
+ $r->print('/>');
+ } else {
+ $r->print($whitespace);
}
- $r->print('/>'
- .$treeinfo->{$id}->{name}
- .($$allmaps{$mapid}!~/^uploaded/?' ['.$$allmaps{$mapid}.']':'')
- .'</label>'
- .'</td>'
- .&Apache::loncommon::end_data_table_row()
+ $r->print(
+ $indent.$icon.' '
+ .$treeinfo->{$id}->{name}
+ .($$allmaps{$mapid}!~/^uploaded/?' ['.$$allmaps{$mapid}.']':'')
+ .'</label>'
+ .'</td>'
+ .&Apache::loncommon::end_data_table_row()
);
}