--- loncom/interface/londocs.pm 2009/02/02 11:23:56 1.333 +++ loncom/interface/londocs.pm 2009/02/12 11:35:07 1.340 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.333 2009/02/02 11:23:56 muellerd Exp $ +# $Id: londocs.pm,v 1.340 2009/02/12 11:35:07 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1899,6 +1899,7 @@ END } my $orig_url = $url; + $orig_url=~s{http(:|:)//https(:|:)//}{https$2//}; my $external = ($url=~s{^http(|s)(:|:)//}{/adm/wrapper/ext/}); if ((!$isfolder) && ($residx) && ($folder!~/supplemental/) && (!$ispage)) { my $symb=&Apache::lonnet::symbclean( @@ -2764,7 +2765,7 @@ sub handler { 'sipr' => 'Simple Problem', 'drbx' => 'Drop Box', 'scuf' => 'Score Upload Form', - 'bull' => 'Bulletin Board', + 'bull' => 'Discussion Board', 'mypi' => 'My Personal Info', 'grpo' => 'Group Files', 'rost' => 'Course Roster', @@ -2872,13 +2873,49 @@ ERFORM $containertag = ''; $uploadtag = ''; } - - $r->print(&generate_admin_options($containertag,$uploadtag,\%lt,\%help,\%env)); - $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc', - &mt('Editing the Table of Contents for your '.$type))); + $r->print(< + + + + + $containertag + +
+ + $uploadtag +
+HIDDENFORM + } +# --------------------------------------------------------- Main tab structure + my $activeClass = 1; + $r->print('
'); # --------------------------------------------------------- Standard documents if (($standard) && ($allowed) && (!$forcesupplement)) { + my $active = 'style="display: none;"'; + if($activeClass == 0){ + $active = 'style="display: block;"'; + } + $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') { $folder='default'; @@ -2893,11 +2930,6 @@ ERFORM #$postexec='self.close();'; } $hadchanges=0; - my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed, - $upload_output,$type); - if ($error) { - $r->print('

'.$error.'

'); - } if ($hadchanges) { &mark_hash_old(); } @@ -3106,24 +3138,36 @@ my %orderhash = ( 'bb' => 'Published Documents', 'cc' => 'Special Documents', 'dd' => 'More Options', - 'zz' => 'Hide all Option', + 'zz' => 'Hide all Options', ); my %namehash = ( 'New Document' => $fileuploadform, 'Published Documents' => $simpleeditdefaultform, 'Special Documents' => $specialdocumentsform, 'More Options' => $extresourcesform.'
'.$imspform.'
'.$recoverform, - 'drei' => 'dr', ); -my $tid = '1'; -my $varcd = 'Course Documents'; -$r->print(&generate_edit_table($varcd,\%namehash,\%orderhash)); +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)); +my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); + if ($error) { + $r->print('

'.$error.'

'); + } +$r->print('
'); } if ($env{'form.pagepath'}) { } } # ----------------------------------------------------- Supplemental documents if (!$forcestandard) { + my $active = 'style="display: none;"'; + if($activeClass == 1){ + $active = 'style="display: block;"'; + } + $r->print('
'); + &changewarning($r); my $folder=$env{'form.folder'}; unless ($folder=~/^supplemental/) { $folder='supplemental'; @@ -3133,10 +3177,6 @@ $r->print(&generate_edit_table($varcd,\% $env{'form.folderpath'} = 'supplemental&'. &escape(&mt('Supplemental '.$type.' Documents')); } - my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); - if ($error) { - $r->print('

'.$error.'

'); - } if ($allowed) { my $folderseq= '/uploaded/'.$coursedom.'/'.$coursenum.'/supplemental_'.time. @@ -3227,20 +3267,24 @@ my %supnamehash = ( 'New Document' => $supupdocform, 'Special Documents' => $supnewfolderform.'
'.$supnewextform.'
'.$supnewsylform.'
'.$supnewaboutmeform, ); -my $tid='2'; -my $varscd = 'Supplemented Course Documents'; -$r->print(< -
  • New Document
  • -
  • Special Documents
  • - -FORM - -#$r->print(&generate_edit_table($varscd,\%supnamehash,\%suporderhash)); +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)); +my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); + if ($error) { + $r->print('

    '.$error.'

    '); + } +$r->print('
    '); } } +$r->print(''); +$r->print('
    '); if ($allowed) { $r->print('
    @@ -3265,24 +3309,18 @@ FORM } sub generate_admin_options { - my ($containertag,$uploadtag,$lt_ref,$help_ref,$env_ref) = @_; - my %lt = %{$lt_ref}; + my ($containertag,$uploadtag,$help_ref,$env_ref) = @_; + my %lt=&Apache::lonlocal::texthash( + 'vc' => 'Verify Content', + 'cv' => 'Check/Set Resource Versions', + 'ls' => 'List Symbs', + 'sl' => 'Show Log' + ); my %help = %{$help_ref}; my %env = %{$env_ref}; my $dumpbut=&dumpbutton(); my $exportbut=&exportbutton(); return (< - - - - - $containertag - -
    - - $uploadtag -
    • @@ -3306,35 +3344,36 @@ sub generate_admin_options {
    -
     
    + ENDOPTIONFORM } sub generate_edit_table { - my ($varcd,$namehash_ref,$orderhash_ref) = @_; + my ($tid,$content,$navigation,$varcd,$namehash_ref,$orderhash_ref) = @_; my %namehash = %{$namehash_ref}; #name verlinkt mit id my %orderhash = %{$orderhash_ref}; #name mit kürzel verlinkt mit name my $form; - { + - $form = '

    '.&mt('Upload '.$varcd).'

    '; - $form .= '