');
# --------------------------------------------------------- Standard documents
- if (($standard) && ($allowed) && (!$forcesupplement)) {
+ my $savefolderpath;
my $active = 'style="display: none;"';
if($activeClass == 0){
$active = 'style="display: block;"';
}
- $r->print('
');
+ $r->print('
');
$r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc',
&mt('Editing the Table of Contents for your '.$type)));
my $folder=$env{'form.folder'};
- if ($folder eq '' || $folder eq 'supplemental') {
+ if ($folder eq '' || $folder=~/^supplemental/) {
$folder='default';
+ $savefolderpath = $env{'form.folderpath'};
$env{'form.folderpath'}='default&'.&escape(&mt('Main '.$type.' Documents'));
$uploadtag = '';
@@ -3099,7 +3099,7 @@ NFFORM
NSYLFORM
-
+
my $newgroupfileform=(<
$uploadtag
@@ -3124,23 +3124,15 @@ if($env{'form.pagepath'}) {
}
my %orderhash = (
- 'aa' => 'New Document',
- 'bb' => 'Published Documents',
- 'cc' => 'Special Documents',
- 'dd' => 'More Tools',
- 'zz' => 'Hide all Options',
- );
-my %namehash = (
- 'New Document' => $fileuploadform.'
'.$newfolderform,
- 'Published Documents' => $simpleeditdefaultform,
- 'Special Documents' => $specialdocumentsform,
- 'More Tools' => $extresourcesform.'
'.$imspform.'
'.$recoverform.'
'.&generate_admin_options($containertag,$uploadtag,\%help,\%env),
+ 'aa' => ['New Document',$fileuploadform.'
'.$newfolderform],
+ 'bb' => ['Published Documents',$simpleeditdefaultform],
+ 'cc' => ['Special Documents',$specialdocumentsform],
+ 'dd' => ['Tools',$extresourcesform.'
'.$imspform.'
'.$recoverform.'
'.&generate_admin_options($containertag,$uploadtag,\%help,\%env)],
+ 'zz' => ['Hide all Options'],
);
my $tid='1';
-my $content='content';
-my $navigation='navigation';
my $varcd = 'Main Course Documents';
-$r->print(&generate_edit_table($tid,$content,$navigation,$varcd,\%namehash,\%orderhash));
+$r->print(&generate_edit_table($tid,$varcd,\%orderhash));
$hadchanges=0;
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
if ($error) {
@@ -3154,9 +3146,7 @@ $r->print(&generate_edit_table($tid,$con
$r->print('
');
if ($env{'form.pagepath'}) {
}
- }
# ----------------------------------------------------- Supplemental documents
- if (!$forcestandard) {
my $active = 'style="display: none;"';
if($activeClass == 1){
$active = 'style="display: block;"';
@@ -3170,7 +3160,10 @@ $r->print('
');
(($env{'form.folderpath'} =~ /^default\&/) || ($env{'form.folderpath'} eq ''))) {
$env{'form.folderpath'} = 'supplemental&'.
&escape(&mt('Supplemental '.$type.' Documents'));
+ }else{
+ $env{'form.folderpath'} = $savefolderpath;
}
+ $env{'form.pagepath'} = '';
if ($allowed) {
my $folderseq=
'/uploaded/'.$coursedom.'/'.$coursenum.'/supplemental_'.time.
@@ -3188,7 +3181,7 @@ $r->print('