--- loncom/interface/londocs.pm 2009/02/19 10:51:40 1.347 +++ loncom/interface/londocs.pm 2009/04/07 20:48:40 1.363 @@ -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.363 2009/04/07 20:48:40 ehlerst Exp $ # # Copyright Michigan State University Board of Trustees # @@ -121,7 +121,7 @@ sub dumpbutton { if ($home) { return ''. - &Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs'); + &Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs').'
'; } else { return '
'. &mt('Dump '.$type. @@ -264,7 +264,7 @@ sub exportbutton { my $type = &Apache::loncommon::course_type(); return ''. - &Apache::loncommon::help_open_topic('Docs_Export_Course_Docs'); + &Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').'
'; } @@ -474,7 +474,7 @@ function containerCheck(item) { $scripttag)); $r->print(&Apache::lonhtmlcommon::breadcrumbs('Export '.lc($type).' to IMS content package')); $r->print($display.''. - '

'. + '

'. '

'); } @@ -1012,7 +1012,7 @@ sub breadcrumbs { } $plain=~s/\>\;\s*$//; return (&Apache::lonhtmlcommon::breadcrumbs(undef,undef,0,'nohelp', - 'LC_docs_path'),$randompick,$ishidden,$isencrypted,$plain,$is_random_order); + 'LC_docs_path', undef, 1 ),$randompick,$ishidden,$isencrypted,$plain,$is_random_order); } sub log_docs { @@ -1775,7 +1775,7 @@ sub entryline { ''; @@ -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 @@ -3124,23 +3125,15 @@ if($env{'form.pagepath'}) { } my %orderhash = ( - 'aa' => 'New Document', - 'bb' => 'Published Documents', - 'cc' => 'Special Documents', - 'dd' => 'More Options', - 'zz' => 'Hide all Options', - ); -my %namehash = ( - 'New Document' => $fileuploadform, - 'Published Documents' => $simpleeditdefaultform, - 'Special Documents' => $specialdocumentsform, - 'More Options' => $extresourcesform.'
'.$imspform.'
'.$recoverform, + '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 +3147,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 +3161,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 +3182,7 @@ $r->print('');

$lt{'comment'}:
-
@@ -3252,32 +3246,21 @@ SNAMFORM my %suporderhash = ( - 'ee' => 'New Document', - 'ff' => 'Special Documents', - 'zz' => 'Hide all Options', - ); - -my %supnamehash = ( - 'New Document' => $supupdocform, - 'Special Documents' => $supnewfolderform.'
'.$supnewextform.'
'.$supnewsylform.'
'.$supnewaboutmeform, + 'ee' => ['New Document',$supupdocform.'
'.$supnewfolderform], + 'ff' => ['Special Documents',$supnewextform.'
'.$supnewsylform.'
'.$supnewaboutmeform], + 'zz' => ['Hide all Options'], ); my $tid='2'; -my $content='content'; -my $navigation='navigation'; my $varscd = 'Supplemental Course Documents'; -$r->print(&generate_edit_table($tid,$content,$navigation,$varscd,\%supnamehash,\%suporderhash)); +$r->print(&generate_edit_table($tid,$varscd,\%suporderhash)); my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); if ($error) { $r->print('

'.$error.'

'); } $r->print(''); } - } -$r->print(''); $r->print(''); if ($allowed) { $r->print(' @@ -3316,54 +3299,40 @@ sub generate_admin_options { my $exportbut=&exportbutton(); return (< - - ENDOPTIONFORM } sub generate_edit_table { - my ($tid,$content,$navigation,$varcd,$namehash_ref,$orderhash_ref) = @_; - my %namehash = %{$namehash_ref}; + my ($tid,$varcd,$orderhash_ref) = @_; my %orderhash = %{$orderhash_ref}; my $form; $form = '

'.&mt($varcd).'

'; - $form .= '