--- loncom/interface/londocs.pm 2010/07/05 12:29:36 1.429 +++ loncom/interface/londocs.pm 2010/08/16 03:49:33 1.434 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.429 2010/07/05 12:29:36 droeschl Exp $ +# $Id: londocs.pm,v 1.434 2010/08/16 03:49:33 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1607,13 +1607,12 @@ sub editor { my $shown=0; if (($ishidden) || ($isencrypted) || ($randompick>=0) || ($is_random_order)) { $r->print('
'.&mt('Parameters:'). - '
'
.&mt('Caution: this folder is set to randomly pick a subset'
@@ -2719,9 +2718,22 @@ sub handler {
$env{'form.pagename'}=&unescape(pop(@pagepath));
$env{'form.folder'}=pop(@pagepath);
$containertag = ''.
- '';
- $uploadtag = ''.
- '';
+ '';
+ $uploadtag =
+ ''.
+ ''.
+ '';
+ } else {
+ my $folderpath=$env{'form.folderpath'};
+ if (!$folderpath) {
+ if ($env{'form.folder'} eq '' ||
+ $env{'form.folder'} eq 'supplemental') {
+ $folderpath='default&'.
+ &escape(&mt('Main '.$crstype.' Documents'));
+ }
+ }
+ $containertag = '';
+ $uploadtag = '';
}
if ($r->uri=~/^\/adm\/coursedocs\/showdoc\/(.*)$/) {
$showdoc='/'.$1;
@@ -3014,18 +3026,6 @@ ERFORM
'sl' => 'Show Log'
);
- my $folderpath=$env{'form.folderpath'};
- if (!$folderpath) {
- if ($env{'form.folder'} eq '' ||
- $env{'form.folder'} eq 'supplemental') {
- $folderpath='default&'.
- &escape(&mt('Main '.$crstype.' Documents'));
- }
- }
- unless ($env{'form.pagepath'}) {
- $containertag = '';
- $uploadtag = '';
- }
$r->print(<'=>$newpageform},
{'
'=>$newsylform},
{'
'=>$newgroupfileform},
- );
-
- }
+ );
+
+ my @importdoc = (
+ {'
'=>$extresourcesform},
+ {'
'=>$imspform},);
+ $fileuploadform = create_form_ul(create_list_elements(@importdoc)) . '
' . $fileuploadform;
+
push @specialdocumentsforma, ({''=>$newnavform},
{'
'=>$newsmppageform},
{'
'=>$newsmpproblemform},
@@ -3292,6 +3296,7 @@ NGFFORM
{'
'=>$newrosterform},);
$specialdocumentsform = create_form_ul(create_list_elements(@specialdocumentsforma));
+ }
if($env{'form.pagepath'}) {
@@ -3308,18 +3313,16 @@ my @tools = (
{'
'=>$recoverform},
);
-my @importdoc = (
- {'
'=>$extresourcesform},
- {'
'=>$imspform},
-);
-$fileuploadform = create_form_ul(create_list_elements(@importdoc)) . '
' . $fileuploadform;
my %orderhash = (
- '00' => ['Newfolder',$newfolderform],
'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)],
+ 'dd' => ['Tools', create_form_ul(create_list_elements(@tools)).&generate_admin_options(\%help,\%env)],
);
+unless($env{'form.pagepath'}) {
+ $orderhash{'00'} = ['Newfolder',$newfolderform];
+}
+
my $tid='1';
$hadchanges=0;
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$crstype);
@@ -3335,8 +3338,6 @@ $r->print(&generate_edit_table($tid,\%or
$r->print('