--- loncom/interface/londocs.pm 2009/03/10 22:15:43 1.355 +++ 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.355 2009/03/10 22:15:43 ehlerst 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 { ''; @@ -3124,23 +3125,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 +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,11 +3182,10 @@ $r->print('');

$lt{'comment'}:
-
- @@ -3205,7 +3198,6 @@ SUPDOCFORM
- - - $help{'Syllabus'} @@ -3246,7 +3236,6 @@ SNSFORM - $help{'My Personal Information Page'} @@ -3257,29 +3246,21 @@ SNAMFORM my %suporderhash = ( - 'ee' => 'New Document', - 'ff' => 'Special Documents', - 'zz' => 'Hide all Options', - ); - -my %supnamehash = ( - 'New Document' => $supupdocform.'
'.$supnewfolderform, - 'Special Documents' => $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(''); if ($allowed) { $r->print(' @@ -3319,9 +3300,9 @@ sub generate_admin_options { return (< $help{'Verify_Content'}
- $help{'Check_Resource_Versions'} - $dumpbut
- $exportbut
+ $help{'Check_Resource_Versions'}
+ $dumpbut + $exportbut
@@ -3332,25 +3313,26 @@ 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 .= '
    '; + $form .= ''; - $form .= '
    '; - foreach my $field (keys(%namehash)){ - $form .= ''; - } + $form .= '
    '; + foreach my $field (keys(%orderhash)){ + if($field ne 'zz'){ + $form .= ''; + } + } $form .= '
    '; return $form;