version 1.376, 2009/07/10 15:05:28
|
version 1.377, 2009/07/10 17:05:05
|
Line 262 sub dumpcourse {
|
Line 262 sub dumpcourse {
|
|
|
sub exportbutton { |
sub exportbutton { |
my $type = &Apache::loncommon::course_type(); |
my $type = &Apache::loncommon::course_type(); |
return '<input type="submit" name="exportcourse" value="'. |
return '<input type="submit" name="exportcourse"' |
&mt('Export '.$type.' to IMS').'" />'. |
.' value="'.&mt('IMS Export').'"' |
|
.' title="'.&mt('Export '.$type.' to IMS Package').'" />'. |
&Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').'<br />'; |
&Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').'<br />'; |
} |
} |
|
|
Line 277 sub exportcourse {
|
Line 278 sub exportcourse {
|
my $numdisc = keys(%discussiontime); |
my $numdisc = keys(%discussiontime); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
if (!defined($navmap)) { |
if (!defined($navmap)) { |
$r->print(&Apache::loncommon::start_page('Export '.lc($type).' to IMS content package'). |
$r->print(&Apache::loncommon::start_page('Export '.$type.' to IMS Package'). |
'<h2>'.&mt('IMS Export Failed').'</h2>'. |
'<h2>'.&mt('IMS Export Failed').'</h2>'. |
'<div class="LC_error">'. |
'<div class="LC_error">'. |
&mt('Unable to retrieve information about course contents'). |
&mt('Unable to retrieve information about course contents'). |
Line 298 sub exportcourse {
|
Line 299 sub exportcourse {
|
my @exportitems = &Apache::loncommon::get_env_multiple('form.archive'); |
my @exportitems = &Apache::loncommon::get_env_multiple('form.archive'); |
my @discussions = &Apache::loncommon::get_env_multiple('form.discussion'); |
my @discussions = &Apache::loncommon::get_env_multiple('form.discussion'); |
if (@exportitems == 0 && @discussions == 0) { |
if (@exportitems == 0 && @discussions == 0) { |
$outcome = '<br />As you did not select any content items or discussions for export, an IMS package has not been created. Please <a href="javascript:history.go(-1)">go back</a> to select either content items or discussions for export'; |
$outcome = |
|
'<p class="LC_warning">' |
|
.&mt('As you did not select any content items or discussions' |
|
.' for export, an IMS package has not been created.') |
|
.'</p>' |
|
.'<p>' |
|
.&mt('Please [_1]go back[_2] to select either content items' |
|
.' or discussions for export.' |
|
,'<a href="javascript:history.go(-1)">' |
|
,'</a>') |
|
.'</p>'; |
} else { |
} else { |
my $now = time; |
my $now = time; |
my %symbs; |
my %symbs; |
Line 321 sub exportcourse {
|
Line 332 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('Download the zip file from [_1]IMS '.lc($type).' archive[_2]' |
|
,'<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 = '<br />'.&mt('Unfortunately you will not be able to retrieve an IMS archive of this posts at this time, because there was a problem creating a manifest file.').'<br />'; |
$outcome = '<p class="LC_error">' |
|
.&mt('Unfortunately you will not be able to retrieve' |
|
.' an IMS archive of this posts at this time,' |
|
.' because there was a problem creating a' |
|
.' manifest file.') |
|
.'</p>' |
|
.'<p><a href="javascript:history.go(-1)">' |
|
.&mt('Go Back') |
|
.'</a></p>'; |
} |
} |
} |
} |
$r->print(&Apache::loncommon::start_page('Export '.lc($type).' to IMS content package')); |
$r->print(&Apache::loncommon::start_page('Export '.$type.' to IMS Package')); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Export '.lc($type).' to IMS content package')); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('IMS Export')); |
$r->print($outcome); |
$r->print($outcome); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
} else { |
} else { |
Line 489 function containerCheck(item) {
|
Line 508 function containerCheck(item) {
|
// ]]> |
// ]]> |
</script> |
</script> |
|; |
|; |
$r->print(&Apache::loncommon::start_page('Export '.lc($type).' to IMS content package', |
$r->print(&Apache::loncommon::start_page('Export '.$type.' to IMS Package', |
$scripttag)); |
$scripttag)); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Export '.lc($type).' to IMS content package')); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('IMS Export')); |
$r->print($display. |
$r->print($display. |
'<p><input type="hidden" name="finishexport" value="1" />'. |
'<p><input type="hidden" name="finishexport" value="1" />'. |
'<input type="submit" name="exportcourse" value="'. |
'<input type="submit" name="exportcourse" value="'. |
&mt('Export '.$type.' DOCS').'" /></p></form>'); |
&mt('Export').'" /></p></form>'); |
} |
} |
} |
} |
|
|
Line 2583 sub handler {
|
Line 2602 sub handler {
|
&init_breadcrumbs('dumpcourse','Dump '.&Apache::loncommon::course_type().' DOCS to Construction Space'); |
&init_breadcrumbs('dumpcourse','Dump '.&Apache::loncommon::course_type().' DOCS to Construction Space'); |
&dumpcourse($r); |
&dumpcourse($r); |
} elsif ($allowed && $env{'form.exportcourse'}) { |
} elsif ($allowed && $env{'form.exportcourse'}) { |
&init_breadcrumbs('exportcourse','Export '.&Apache::loncommon::course_type().' to IMS'); |
&init_breadcrumbs('exportcourse','IMS Export'); |
&exportcourse($r); |
&exportcourse($r); |
} else { |
} else { |
# is this a standard course? |
# is this a standard course? |
Line 2773 sub handler {
|
Line 2792 sub handler {
|
'uplm' => 'Upload a new main '.lc($type).' document', |
'uplm' => 'Upload a new main '.lc($type).' document', |
'upls' => 'Upload a new supplemental '.lc($type).' document', |
'upls' => 'Upload a new supplemental '.lc($type).' document', |
'impp' => 'Import a document', |
'impp' => 'Import a document', |
'pubd' => 'Published Documents', |
|
'copm' => 'All documents out of a published map into this folder', |
'copm' => 'All documents out of a published map into this folder', |
'upld' => 'Upload Document', |
'upld' => 'Upload Document', |
'srch' => 'Search', |
'srch' => 'Search', |
Line 2796 sub handler {
|
Line 2814 sub handler {
|
'grpo' => 'Group Portfolio', |
'grpo' => 'Group Portfolio', |
'rost' => 'Course Roster', |
'rost' => 'Course Roster', |
'abou' => 'Personal Information Page for a User', |
'abou' => 'Personal Information Page for a User', |
'imsf' => 'Import IMS package', |
'imsf' => 'IMS Import', |
|
'imsl' => 'Import IMS package', |
'file' => 'File', |
'file' => 'File', |
'title' => 'Title', |
'title' => 'Title', |
'comment' => 'Comment', |
'comment' => 'Comment', |
Line 2805 sub handler {
|
Line 2824 sub handler {
|
'pm' => 'Published Map', |
'pm' => 'Published Map', |
'sd' => 'Special Document', |
'sd' => 'Special Document', |
'mo' => 'More Options', |
'mo' => 'More Options', |
'hao' => 'Hide all Options' |
|
); |
); |
# ----------------------------------------------------------------------------- |
# ----------------------------------------------------------------------------- |
my $fileupload=(<<FIUP); |
my $fileupload=(<<FIUP); |
Line 2847 FUFORM
|
Line 2865 FUFORM
|
my $simpleeditdefaultform=(<<SEDFFORM); |
my $simpleeditdefaultform=(<<SEDFFORM); |
<form action="/adm/coursedocs" method="post" name="simpleeditdefault"> |
<form action="/adm/coursedocs" method="post" name="simpleeditdefault"> |
<input type="hidden" name="active" value="bb" /> |
<input type="hidden" name="active" value="bb" /> |
$lt{'pubd'}<br /> |
|
$uploadtag |
$uploadtag |
<input type="button" onclick="javascript:groupsearch()" value="$lt{'srch'}" /> |
<input type="button" onclick="javascript:groupsearch()" value="$lt{'srch'}" /> |
<br /> |
<br /> |
Line 2983 RFORM
|
Line 3000 RFORM
|
my $imspform=(<<IMSPFORM); |
my $imspform=(<<IMSPFORM); |
<form action="/adm/imsimportdocs" method="post" name="ims"> |
<form action="/adm/imsimportdocs" method="post" name="ims"> |
<input type="hidden" name="folder" value="$folder" /> |
<input type="hidden" name="folder" value="$folder" /> |
<input name="imsimport" type="button" value="$lt{'imsf'}" onclick="javascript:makeims();" /> |
<input name="imsimport" type="button" value="$lt{'imsf'}" title="$lt{imsl}" onclick="javascript:makeims();" /> |
</form> |
</form> |
IMSPFORM |
IMSPFORM |
|
|
Line 3172 if($env{'form.pagepath'}) {
|
Line 3189 if($env{'form.pagepath'}) {
|
|
|
my %orderhash = ( |
my %orderhash = ( |
'aa' => ['Upload Document',$fileuploadform.'<br />'.$newfolderform], |
'aa' => ['Upload Document',$fileuploadform.'<br />'.$newfolderform], |
'bb' => ['Published Documents',$simpleeditdefaultform], |
'bb' => ['Published Resources',$simpleeditdefaultform], |
'cc' => ['Special Documents',$specialdocumentsform], |
'cc' => ['Special Documents',$specialdocumentsform], |
'dd' => ['Tools',$extresourcesform.'<br />'.$imspform.'<br />'.$recoverform.'<br />'.&generate_admin_options($containertag,$uploadtag,\%help,\%env)], |
'dd' => ['Tools',$extresourcesform.'<br />'.$imspform.'<br />'.$recoverform.'<br />'.&generate_admin_options($containertag,$uploadtag,\%help,\%env)], |
'zz' => ['Hide all Options'], |
'zz' => ['Hide'], |
); |
); |
my $tid='1'; |
my $tid='1'; |
my $varcd = 'Main Course Documents'; |
my $varcd = 'Main Course Documents'; |
Line 3301 SNAMFORM
|
Line 3318 SNAMFORM
|
my %suporderhash = ( |
my %suporderhash = ( |
'ee' => ['Upload Document',$supupdocform.'<br />'.$supnewfolderform], |
'ee' => ['Upload Document',$supupdocform.'<br />'.$supnewfolderform], |
'ff' => ['Special Documents',$supnewextform.'<br />'.$supnewsylform.'<br />'.$supnewaboutmeform], |
'ff' => ['Special Documents',$supnewextform.'<br />'.$supnewsylform.'<br />'.$supnewaboutmeform], |
'zz' => ['Hide all Options'], |
'zz' => ['Hide'], |
); |
); |
|
|
my $tid='2'; |
my $tid='2'; |