--- loncom/interface/londocs.pm 2010/01/20 23:51:16 1.413
+++ loncom/interface/londocs.pm 2010/01/30 13:06:43 1.417
@@ -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.417 2010/01/30 13:06:43 droeschl Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -124,10 +124,8 @@ sub dumpbutton {
return $link.' '.
&Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs').' ';
} else {
- return '
'.
- &mt('Dump '.$crstype.
- ' DOCS to Construction Space: available on other servers').
- '
';
+ return &mt('Dump '.$crstype.
+ ' DOCS to Construction Space: available on other servers');
}
}
@@ -341,20 +339,20 @@ sub exportcourse {
open(OUTPUT, "zip -r $imszip * 2> /dev/null |");
close(OUTPUT);
chdir $cwd;
+ $outcome .= ''
+ .&mt('[_1]Your IMS package[_2] is ready for download.'
+ ,'',' ')
+ .'
';
if ($copyresult) {
$outcome .= ''
.&mt('The following errors occurred during export - [_1]'
,$copyresult)
.'
';
}
- $outcome .= ''
- .&mt('[_1]Your IMS package[_2] is ready for download.'
- ,'',' ')
- .'
';
} else {
$outcome = ''
.&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'
.' manifest file.')
.'
'
@@ -377,14 +375,17 @@ sub exportcourse {
' '.
' '.
- ''.
- ''.&mt('Discussion posts').' '.
- ' '.
- ' '.
- ' ';
+ ' onclick="javascript:uncheckAll(document.exportdoc.archive)" />';
+ if ($numdisc > 0) {
+ $display .= ''.
+ ''.&mt('Discussion posts').' '.
+ ' '.
+ ' '.
+ ' ';
+ }
+ $display .= '';
my $curRes;
my $depth = 0;
my $count = 0;
@@ -395,15 +396,11 @@ sub exportcourse {
my $lastcontainer = $startcount;
$display .= &Apache::loncommon::start_data_table()
.&Apache::loncommon::start_data_table_header_row()
- .''.&mt('Export content item?').' '
- .'';
+ .' '.&mt('Export content item?').' ';
if ($numdisc > 0) {
- $display .= &mt('Export discussion posts?');
- } else {
- $display .= ' ';
+ $display .= ''.&mt('Export discussion posts?').' ';
}
- $display .= ''
- .&Apache::loncommon::end_data_table_header_row();
+ $display .= &Apache::loncommon::end_data_table_header_row();
while ($curRes = $it->next()) {
if (ref($curRes)) {
$count ++;
@@ -424,37 +421,33 @@ sub exportcourse {
$ressymb = 'bulletin___'.$3.'___adm/wrapper/adm/'.$1.'/'.$2.'/'.$3.'/bulletinboard';
}
}
+ my $currelem = $count+$boards+$startcount;
$display .= &Apache::loncommon::start_data_table_row()
.''."\n"
.' is_sequence()) || ($curRes->is_page())) {
- my $checkitem = $count + $boards + $startcount;
- $display .= 'onclick="javascript:propagateCheck('."'$checkitem'".')"';
+ $lastcontainer = $currelem;
+ $display .= 'onclick="javascript:propagateCheck('."'$currelem'".')"';
}
$display .= ' />'."\n";
for (my $i=0; $i<$depth; $i++) {
- $display .= ' '
- .' '."\n";
+ $display .= (' ' x2)."\n";
}
if ($curRes->is_sequence()) {
$display .= ' '."\n";
- $lastcontainer = $count + $startcount + $boards;
} elsif ($curRes->is_page()) {
$display .= ' '."\n";
- $lastcontainer = $count + $startcount + $boards;
}
- my $currelem = $count+$boards+$startcount;
$children{$parent{$depth}} .= $currelem.':';
$display .= ' '.$curRes->title().' '."\n";
# Existing discussion posts?
if ($discussiontime{$ressymb} > 0) {
$boards ++;
- $currelem = $count+$boards+$startcount;
$display .= ''
.' '
.' '."\n";
- } else {
+ } elsif ($numdisc > 0) {
$display .= ' '."\n";
}
$display .= &Apache::loncommon::end_data_table_row();
@@ -2897,7 +2890,7 @@ sub create_form_ul {
'upls' => 'Upload a new supplemental '.lc($crstype).' document',
'impp' => 'Import a document',
'copm' => 'All documents out of a published map into this folder',
- 'upld' => 'Upload Document',
+ 'upld' => 'Import Document',
'srch' => 'Search',
'impo' => 'Import',
'book' => 'Import Bookmarks',
@@ -2971,9 +2964,9 @@ FUFORM
SEDFFORM
my @simpleeditdefaultforma = (
- { ' ' => "$uploadtag$lt{'srch'} " },
- { ' ' => "$lt{'impo'} $help{'Importing_LON-CAPA_Resource'}" },
- { ' ' => "$lt{'book'} " },
+ { ' ' => "$uploadtag$lt{'srch'} " },
+ { ' ' => "$lt{'impo'} $help{'Importing_LON-CAPA_Resource'}" },
+ { ' ' => "$lt{'book'} " },
);
$simpleeditdefaultform .= create_form_ul(create_list_elements(@simpleeditdefaultforma));
$simpleeditdefaultform .=(<
NGFFORM
@specialdocumentsforma=(
- {' '=>$newpageform},
- {' '=>$newsylform},
- {' '=>$newgroupfileform},
+ {' '=>$newpageform},
+ {' '=>$newsylform},
+ {' '=>$newgroupfileform},
);
}
- push @specialdocumentsforma, ({' '=>$newnavform},
- {' '=>$newsmppageform},
- {' '=>$newsmpproblemform},
- {' '=>$newdropboxform},
- {' '=>$newexuploadform},
- {' '=>$newbulform},
- {' '=>$newaboutmeform},
- {' '=>$newaboutsomeoneform},
- {' '=>$newrosterform},);
+ push @specialdocumentsforma, ({' '=>$newnavform},
+ {' '=>$newsmppageform},
+ {' '=>$newsmpproblemform},
+ {' '=>$newdropboxform},
+ {' '=>$newexuploadform},
+ {' '=>$newbulform},
+ {' '=>$newaboutmeform},
+ {' '=>$newaboutsomeoneform},
+ {' '=>$newrosterform},);
$specialdocumentsform = create_form_ul(create_list_elements(@specialdocumentsforma));
if($env{'form.pagepath'}) {
@specialdocumentsforma=(
- {' '=>$newsmpproblemform},
- {' '=>$newexuploadform}
+ {' '=>$newsmpproblemform},
+ {' '=>$newexuploadform}
);
$specialdocumentsform= create_form_ul(create_list_elements(@specialdocumentsforma));
}
my @tools = (
- {' '=>$extresourcesform},
- {' '=>$imspform},
- {' '=>$recoverform},
+# {' '=>$extresourcesform},
+# {' '=>$imspform},
+ {' '=>$recoverform},
);
+my @importdoc = (
+ {' '=>$extresourcesform},
+ {' '=>$imspform},
+);
+$fileuploadform = create_form_ul(create_list_elements(@importdoc)) . ' ' . $fileuploadform;
my %orderhash = (
'00' => ['Newfolder',$newfolderform],
- 'aa' => ['Upload Document',$fileuploadform],
+ 'aa' => ['Import Documents',$fileuploadform],
'bb' => ['Published Resources',$simpleeditdefaultform],
'cc' => ['Special Documents',$specialdocumentsform],
'dd' => ['Tools', create_form_ul(create_list_elements(@tools)).&generate_admin_options($containertag,$uploadtag,\%help,\%env)],
@@ -3408,13 +3406,19 @@ SNAMFORM
my @specialdocs = (
- {' '=>$supnewextform},
- {' '=>$supnewsylform},
- {' '=>$supnewaboutmeform},
+ {' '
+ =>$supnewsylform},
+ {' '
+ =>$supnewaboutmeform},
);
+my @supimportdoc = (
+ {' '
+ =>$supnewextform},
+ );
+$supupdocform = create_form_ul(create_list_elements(@supimportdoc)) . ' ' . $supupdocform;
my %suporderhash = (
'00' => ['Supnewfolder', $supnewfolderform],
- 'ee' => ['Upload Document',$supupdocform],
+ 'ee' => ['Import Documents',$supupdocform],
'ff' => ['Special Documents',create_form_ul(create_list_elements(@specialdocs))]
);
@@ -3474,15 +3478,20 @@ sub generate_admin_options {
my $dumpbut=&dumpbutton();
my $exportbut=&exportbutton();
my @list = (
- {' '=>"$lt{'vc'} $help{'Verify_Content'}"},
- {' '=>"$lt{'cv'} $help{'Check_Resource_Versions'}"},
+ {' '
+ => "$lt{'vc'} $help{'Verify_Content'}"},
+ {' '
+ =>"$lt{'cv'} $help{'Check_Resource_Versions'}"},
);
if($dumpbut ne ''){
- push @list, {' '=>$dumpbut};
+ push @list, {' '=>$dumpbut};
}
- push @list, ({' '=>$exportbut},
- {' '=>"$lt{'ls'} "},
- {' '=>"$lt{'sl'} "},
+ push @list, ({' '
+ =>$exportbut},
+ {' '
+ =>"$lt{'ls'} "},
+ {' '
+ =>"$lt{'sl'} "},
);
return '';
@@ -3499,7 +3508,7 @@ sub generate_edit_table {
if($env{'form.active'} ne ''){
$activetab = $env{'form.active'};
}
- $form = '';
+ $form = '
';
$form .= '
';
foreach my $name (sort(keys(%orderhash))){
if($name ne '00'){