--- loncom/interface/londocs.pm 2009/02/19 10:51:40 1.347 +++ 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.347 2009/02/19 10:51:40 weissno Exp $ +# $Id: londocs.pm,v 1.357 2009/03/17 14:50:53 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2540,7 +2540,7 @@ sub handler { 'Docs_About_Bulletin_Board,Docs_Editing_Templated_Pages'); $help{'My Personal Information Page'} = &Apache::loncommon::help_open_topic( 'Docs_About_My_Personal_Info,Docs_Editing_Templated_Pages'); - $help{'Group Files'} = &Apache::loncommon::help_open_topic('Docs_About_Group_Files'); + $help{'Group Portfolio'} = &Apache::loncommon::help_open_topic('Docs_About_Group_Files'); $help{'Caching'} = &Apache::loncommon::help_open_topic('Caching'); # does this user have privileges to modify docs @@ -2767,9 +2767,9 @@ sub handler { 'scuf' => 'Score Upload Form', 'bull' => 'Discussion Board', 'mypi' => 'My Personal Information Page', - 'grpo' => 'Group Files', + 'grpo' => 'Group Portfolio', 'rost' => 'Course Roster', - 'abou' => 'About User', + 'abou' => 'Personal Information Page for a User', 'imsf' => 'Import IMS package', 'file' => 'File', 'title' => 'Title', @@ -2889,26 +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;"'; @@ -2917,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 = ''; @@ -3060,6 +3060,7 @@ NASOFORM NROSTFORM my $specialdocumentsform; +my $newfolderform; unless ($env{'form.pagepath'}) { my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"'); @@ -3076,7 +3077,7 @@ my $specialdocumentsform; NPFORM - my $newfolderform=(< @@ -3107,12 +3108,12 @@ NSYLFORM value="$lt{'grpo'}=/adm/$coursedom/$coursenum/aboutme" /> - $help{'Group Files'} + $help{'Group Portfolio'} NGFFORM - $specialdocumentsform="
$newfolderform
$newpageform
$newsylform
$newgroupfileform"; + $specialdocumentsform="
$newpageform
$newsylform
$newgroupfileform"; } $specialdocumentsform.="
$newnavform
$newsmppageform
$newsmpproblemform
$newdropboxform @@ -3127,14 +3128,14 @@ my %orderhash = ( 'aa' => 'New Document', 'bb' => 'Published Documents', 'cc' => 'Special Documents', - 'dd' => 'More Options', + 'dd' => 'Tools', 'zz' => 'Hide all Options', ); my %namehash = ( - 'New Document' => $fileuploadform, + 'New Document' => $fileuploadform.'
'.$newfolderform, 'Published Documents' => $simpleeditdefaultform, 'Special Documents' => $specialdocumentsform, - 'More Options' => $extresourcesform.'
'.$imspform.'
'.$recoverform, + '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= @@ -3258,8 +3259,8 @@ my %suporderhash = ( ); my %supnamehash = ( - 'New Document' => $supupdocform, - 'Special Documents' => $supnewfolderform.'
'.$supnewextform.'
'.$supnewsylform.'
'.$supnewaboutmeform, + 'New Document' => $supupdocform.'
'.$supnewfolderform, + 'Special Documents' => $supnewextform.'
'.$supnewsylform.'
'.$supnewaboutmeform, ); my $tid='2'; @@ -3274,10 +3275,6 @@ my $error = &editor($r,$coursenum,$cours } $r->print(''); } - } -$r->print(''); $r->print(''); if ($allowed) { $r->print(' @@ -3316,29 +3313,14 @@ sub generate_admin_options { my $exportbut=&exportbutton(); return (< - - ENDOPTIONFORM } @@ -3354,7 +3336,7 @@ sub generate_edit_table { $form .= '