--- loncom/interface/londocs.pm 2009/03/10 18:49:22 1.354 +++ loncom/interface/londocs.pm 2009/03/17 14:50:53 1.357 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.354 2009/03/10 18:49:22 tempelho Exp $ +# $Id: londocs.pm,v 1.357 2009/03/17 14:50:53 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2889,25 +2889,25 @@ HIDDENFORM } # --------------------------------------------------------- Main tab structure my $activeClass = 1; + my $active = ''; $r->print('
'); # --------------------------------------------------------- Standard documents - if (($standard) && ($allowed) && (!$forcesupplement)) { + my $savefolderpath; my $active = 'style="display: none;"'; if($activeClass == 0){ $active = 'style="display: block;"'; @@ -2916,8 +2916,9 @@ HIDDENFORM $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 = ''; @@ -3127,14 +3128,14 @@ my %orderhash = ( 'aa' => 'New Document', 'bb' => 'Published Documents', 'cc' => 'Special Documents', - 'dd' => 'More Tools', + 'dd' => '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), + 'Tools' => $extresourcesform.'
'.$imspform.'
'.$recoverform.'
'.&generate_admin_options($containertag,$uploadtag,\%help,\%env), ); my $tid='1'; my $content='content'; @@ -3154,9 +3155,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,6 +3169,8 @@ $r->print('
'); (($env{'form.folderpath'} =~ /^default\&/) || ($env{'form.folderpath'} eq ''))) { $env{'form.folderpath'} = 'supplemental&'. &escape(&mt('Supplemental '.$type.' Documents')); + }else{ + $env{'form.folderpath'} = $savefolderpath; } if ($allowed) { my $folderseq= @@ -3274,7 +3275,6 @@ my $error = &editor($r,$coursenum,$cours } $r->print(''); } - } $r->print(''); if ($allowed) { $r->print(' @@ -3314,7 +3314,7 @@ sub generate_admin_options { return (< $help{'Verify_Content'}
- $help{'Check_Resource_Versions'} + $help{'Check_Resource_Versions'}
$dumpbut
$exportbut