version 1.412, 2010/01/13 14:32:57
|
version 1.416, 2010/01/21 23:19:17
|
Line 341 sub exportcourse {
|
Line 341 sub exportcourse {
|
open(OUTPUT, "zip -r $imszip * 2> /dev/null |"); |
open(OUTPUT, "zip -r $imszip * 2> /dev/null |"); |
close(OUTPUT); |
close(OUTPUT); |
chdir $cwd; |
chdir $cwd; |
|
$outcome .= '<p>' |
|
.&mt('[_1]Your IMS package[_2] is ready for download.' |
|
,'<a href="'.$imszipfile.'">','</a>') |
|
.'</p>'; |
if ($copyresult) { |
if ($copyresult) { |
$outcome .= '<p class="LC_error">' |
$outcome .= '<p class="LC_error">' |
.&mt('The following errors occurred during export - [_1]' |
.&mt('The following errors occurred during export - [_1]' |
,$copyresult) |
,$copyresult) |
.'</p>'; |
.'</p>'; |
} |
} |
$outcome .= '<p>' |
|
.&mt('[_1]Your IMS package[_2] is ready for download.' |
|
,'<a href="'.$imszipfile.'">','</a>') |
|
.'</p>'; |
|
} else { |
} else { |
$outcome = '<p class="LC_error">' |
$outcome = '<p class="LC_error">' |
.&mt('Unfortunately you will not be able to retrieve' |
.&mt('Unfortunately you will not be able to retrieve' |
.' an IMS archive of this posts at this time,' |
.' an IMS archive of your course at this time,' |
.' because there was a problem creating a' |
.' because there was a problem creating a' |
.' manifest file.') |
.' manifest file.') |
.'</p>' |
.'</p>' |
Line 368 sub exportcourse {
|
Line 368 sub exportcourse {
|
$r->print($outcome); |
$r->print($outcome); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
} else { |
} else { |
my $display; |
my $display='<form name="exportdoc" action="" method="post">'."\n". |
$display = '<form name="exportdoc" action="" method="post">'."\n"; |
'<p>'. |
$display .= '<p>' |
&mt('Choose which items you wish to export from your '.$crstype.'.'). |
.&mt('Choose which items you wish to export from your '.$crstype.'.') |
'</p>'. |
.'</p>'; |
'<div class="LC_columnSection"><fieldset>'. |
$display .= '<div class="LC_columnSection"><fieldset>'. |
|
'<legend>'.&mt('Content items').'</legend>'. |
'<legend>'.&mt('Content items').'</legend>'. |
'<input type="button" value="'.&mt('check all').'" '. |
'<input type="button" value="'.&mt('check all').'" '. |
'onclick="javascript:checkAll(document.exportdoc.archive)" />'. |
'onclick="javascript:checkAll(document.exportdoc.archive)" />'. |
' <input type="button" value="'.&mt('uncheck all').'"'. |
' <input type="button" value="'.&mt('uncheck all').'"'. |
' onclick="javascript:uncheckAll(document.exportdoc.archive)" /></fieldset>'. |
' onclick="javascript:uncheckAll(document.exportdoc.archive)" /></fieldset>'; |
'<fieldset>'. |
if ($numdisc > 0) { |
'<legend>'.&mt('Discussion posts').'</legend>'. |
$display .= '<fieldset>'. |
'<input type="button" value="'.&mt('check all').'"'. |
'<legend>'.&mt('Discussion posts').'</legend>'. |
' onclick="javascript:checkAll(document.exportdoc.discussion)" />'. |
'<input type="button" value="'.&mt('check all').'"'. |
' <input type="button" value="'.&mt('uncheck all').'"'. |
' onclick="javascript:checkAll(document.exportdoc.discussion)" />'. |
' onclick="javascript:uncheckAll(document.exportdoc.discussion)" />'. |
' <input type="button" value="'.&mt('uncheck all').'"'. |
'</fieldset></div>'; |
' onclick="javascript:uncheckAll(document.exportdoc.discussion)" />'. |
|
'</fieldset>'; |
|
} |
|
$display .= '</div>'; |
my $curRes; |
my $curRes; |
my $depth = 0; |
my $depth = 0; |
my $count = 0; |
my $count = 0; |
Line 396 sub exportcourse {
|
Line 398 sub exportcourse {
|
my $lastcontainer = $startcount; |
my $lastcontainer = $startcount; |
$display .= &Apache::loncommon::start_data_table() |
$display .= &Apache::loncommon::start_data_table() |
.&Apache::loncommon::start_data_table_header_row() |
.&Apache::loncommon::start_data_table_header_row() |
.'<th>'.&mt('Export content item?').'</th>' |
.'<th>'.&mt('Export content item?').'</th>'; |
.'<th>'; |
|
if ($numdisc > 0) { |
if ($numdisc > 0) { |
$display .= &mt('Export discussion posts?'); |
$display .= '<th>'.&mt('Export discussion posts?').'</th>'; |
} else { |
|
$display .= ' '; |
|
} |
} |
$display .= '</th>' |
$display .= &Apache::loncommon::end_data_table_header_row(); |
.&Apache::loncommon::end_data_table_header_row(); |
|
while ($curRes = $it->next()) { |
while ($curRes = $it->next()) { |
if (ref($curRes)) { |
if (ref($curRes)) { |
$count ++; |
$count ++; |
Line 425 sub exportcourse {
|
Line 423 sub exportcourse {
|
$ressymb = 'bulletin___'.$3.'___adm/wrapper/adm/'.$1.'/'.$2.'/'.$3.'/bulletinboard'; |
$ressymb = 'bulletin___'.$3.'___adm/wrapper/adm/'.$1.'/'.$2.'/'.$3.'/bulletinboard'; |
} |
} |
} |
} |
|
my $currelem = $count+$boards+$startcount; |
$display .= &Apache::loncommon::start_data_table_row() |
$display .= &Apache::loncommon::start_data_table_row() |
.'<td>'."\n" |
.'<td>'."\n" |
.'<input type="checkbox" name="archive" value="'.$count.'" '; |
.'<input type="checkbox" name="archive" value="'.$count.'" '; |
if (($curRes->is_sequence()) || ($curRes->is_page())) { |
if (($curRes->is_sequence()) || ($curRes->is_page())) { |
my $checkitem = $count + $boards + $startcount; |
$lastcontainer = $currelem; |
$display .= 'onclick="javascript:propagateCheck('."'$checkitem'".')"'; |
$display .= 'onclick="javascript:propagateCheck('."'$currelem'".')"'; |
} |
} |
$display .= ' />'."\n"; |
$display .= ' />'."\n"; |
for (my $i=0; $i<$depth; $i++) { |
for (my $i=0; $i<$depth; $i++) { |
$display .= '<img src="/adm/lonIcons/whitespace1.gif" class="LC_docs_spacer" alt="" />' |
$display .= ('<img src="/adm/lonIcons/whitespace1.gif" class="LC_docs_spacer" alt="" />' x2)."\n"; |
.'<img src="/adm/lonIcons/whitespace1.gif" class="LC_docs_spacer" alt="" />'."\n"; |
|
} |
} |
if ($curRes->is_sequence()) { |
if ($curRes->is_sequence()) { |
$display .= '<img src="/adm/lonIcons/navmap.folder.open.gif" alt="" /> '."\n"; |
$display .= '<img src="/adm/lonIcons/navmap.folder.open.gif" alt="" /> '."\n"; |
$lastcontainer = $count + $startcount + $boards; |
|
} elsif ($curRes->is_page()) { |
} elsif ($curRes->is_page()) { |
$display .= '<img src="/adm/lonIcons/navmap.page.open.gif" alt="" /> '."\n"; |
$display .= '<img src="/adm/lonIcons/navmap.page.open.gif" alt="" /> '."\n"; |
$lastcontainer = $count + $startcount + $boards; |
|
} |
} |
my $currelem = $count+$boards+$startcount; |
|
$children{$parent{$depth}} .= $currelem.':'; |
$children{$parent{$depth}} .= $currelem.':'; |
$display .= ' '.$curRes->title().'</td>'."\n"; |
$display .= ' '.$curRes->title().'</td>'."\n"; |
|
|
# Existing discussion posts? |
# Existing discussion posts? |
if ($discussiontime{$ressymb} > 0) { |
if ($discussiontime{$ressymb} > 0) { |
$boards ++; |
$boards ++; |
$currelem = $count+$boards+$startcount; |
|
$display .= '<td align="right">' |
$display .= '<td align="right">' |
.'<input type="checkbox" name="discussion" value="'.$count.'" />' |
.'<input type="checkbox" name="discussion" value="'.$count.'" />' |
.'</td>'."\n"; |
.'</td>'."\n"; |
} else { |
} elsif ($numdisc > 0) { |
$display .= '<td> </td>'."\n"; |
$display .= '<td> </td>'."\n"; |
} |
} |
$display .= &Apache::loncommon::end_data_table_row(); |
$display .= &Apache::loncommon::end_data_table_row(); |