--- loncom/interface/londocs.pm 2009/02/04 13:03:44 1.336 +++ loncom/interface/londocs.pm 2009/02/12 15:45:38 1.341 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.336 2009/02/04 13:03:44 schafran Exp $ +# $Id: londocs.pm,v 1.341 2009/02/12 15:45:38 ehlerst 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( @@ -2872,12 +2873,23 @@ ERFORM $containertag = ''; $uploadtag = ''; } - - $r->print(&generate_admin_options($containertag,$uploadtag,\%lt,\%help,\%env)); + $r->print(< + + + + + $containertag + +
+ + $uploadtag +
+HIDDENFORM } # --------------------------------------------------------- Main tab structure my $activeClass = 1; - $r->print('
'); # --------------------------------------------------------- Standard documents if (($standard) && ($allowed) && (!$forcesupplement)) { my $active = 'style="display: none;"'; @@ -2916,11 +2929,16 @@ ERFORM } else { #$postexec='self.close();'; } - $hadchanges=0; - if ($hadchanges) { - &mark_hash_old(); - } - &changewarning($r,$postexec); +# $hadchanges=0; +# my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); +# if ($error) { +# $r->print('

'.$error.'

'); +# } +# if ($hadchanges) { +# &mark_hash_old(); +# } +# +# &changewarning($r,$postexec); my $folderseq='/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time. '.sequence'; my $pageseq = '/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time. @@ -3138,10 +3156,16 @@ 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); + $hadchanges=0; + my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); if ($error) { $r->print('

'.$error.'

'); } + if ($hadchanges) { + &mark_hash_old(); + } + + &changewarning($r,''); $r->print('
'); } if ($env{'form.pagepath'}) { @@ -3264,9 +3288,12 @@ my $error = &editor($r,$coursenum,$cours if ($error) { $r->print('

'.$error.'

'); } -$r->print('print('
'); } } +$r->print(''); $r->print('
'); if ($allowed) { $r->print(' @@ -3292,24 +3319,18 @@ $r->print(''); } 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 -
  • @@ -3333,7 +3354,7 @@ sub generate_admin_options {
-
 
+ ENDOPTIONFORM } @@ -3356,6 +3377,7 @@ sub generate_edit_table { $form .= '
  • '.&mt($orderhash{$name}).'
  • '; } } + $form .= ''; $form .= '
    '; foreach my $field (keys(%namehash)){ $form .= '';