[LON-CAPA-cvs] cvs: loncom /interface londocs.pm
raeburn
raeburn@source.lon-capa.org
Thu, 21 Jan 2010 14:55:18 -0000
raeburn Thu Jan 21 14:55:18 2010 EDT
Modified files:
/loncom/interface londocs.pm
Log:
- IMS Export.
- Only display check all/uncheck all buttons for Discussion Posts and column to select posts for export if there are resources with discussions.
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.413 loncom/interface/londocs.pm:1.414
--- loncom/interface/londocs.pm:1.413 Wed Jan 20 23:51:16 2010
+++ loncom/interface/londocs.pm Thu Jan 21 14:55:18 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.413 2010/01/20 23:51:16 raeburn Exp $
+# $Id: londocs.pm,v 1.414 2010/01/21 14:55:18 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -377,14 +377,17 @@
'<input type="button" value="'.&mt('check all').'" '.
'onclick="javascript:checkAll(document.exportdoc.archive)" />'.
' <input type="button" value="'.&mt('uncheck all').'"'.
- ' onclick="javascript:uncheckAll(document.exportdoc.archive)" /></fieldset>'.
- '<fieldset>'.
- '<legend>'.&mt('Discussion posts').'</legend>'.
- '<input type="button" value="'.&mt('check all').'"'.
- ' onclick="javascript:checkAll(document.exportdoc.discussion)" />'.
- ' <input type="button" value="'.&mt('uncheck all').'"'.
- ' onclick="javascript:uncheckAll(document.exportdoc.discussion)" />'.
- '</fieldset></div>';
+ ' onclick="javascript:uncheckAll(document.exportdoc.archive)" /></fieldset>';
+ if ($numdisc > 0) {
+ $display .= '<fieldset>'.
+ '<legend>'.&mt('Discussion posts').'</legend>'.
+ '<input type="button" value="'.&mt('check all').'"'.
+ ' onclick="javascript:checkAll(document.exportdoc.discussion)" />'.
+ ' <input type="button" value="'.&mt('uncheck all').'"'.
+ ' onclick="javascript:uncheckAll(document.exportdoc.discussion)" />'.
+ '</fieldset>';
+ }
+ $display .= '</div>';
my $curRes;
my $depth = 0;
my $count = 0;
@@ -395,15 +398,11 @@
my $lastcontainer = $startcount;
$display .= &Apache::loncommon::start_data_table()
.&Apache::loncommon::start_data_table_header_row()
- .'<th>'.&mt('Export content item?').'</th>'
- .'<th>';
+ .'<th>'.&mt('Export content item?').'</th>';
if ($numdisc > 0) {
- $display .= &mt('Export discussion posts?');
- } else {
- $display .= ' ';
+ $display .= '<th>'.&mt('Export discussion posts?').'</th>';
}
- $display .= '</th>'
- .&Apache::loncommon::end_data_table_header_row();
+ $display .= &Apache::loncommon::end_data_table_header_row();
while ($curRes = $it->next()) {
if (ref($curRes)) {
$count ++;
@@ -454,7 +453,7 @@
$display .= '<td align="right">'
.'<input type="checkbox" name="discussion" value="'.$count.'" />'
.'</td>'."\n";
- } else {
+ } elsif ($numdisc > 0) {
$display .= '<td> </td>'."\n";
}
$display .= &Apache::loncommon::end_data_table_row();