--- loncom/interface/londocs.pm 2020/03/03 01:16:35 1.668 +++ loncom/interface/londocs.pm 2020/09/08 19:15:18 1.674 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.668 2020/03/03 01:16:35 raeburn Exp $ +# $Id: londocs.pm,v 1.674 2020/09/08 19:15:18 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1227,7 +1227,7 @@ sub update_paste_buffer { } elsif ($url =~ m{^/res/$match_domain/$match_username/}) { $pasteurls{$url} = 1; } else { - $pasteurls{$cid.'_'.$url} = 1; + $pasteurls{$cid.'_'.$url} = 1; } } } @@ -4203,12 +4203,7 @@ END if (&Apache::lonnet::symbverify($symb,$url)) { my $shownsymb = $symb; if ($isexternal) { - if ($url =~ /^([^#]+)#([^#]+)$/) { - $url = $1; - $anchor = $2; - my $escan = &escape('#'); - $shownsymb =~ s/^([^\#]+)#([^\#]+)$/$1$escan$2/; - } + $url =~ s/\#[^#]+$//; if ($container eq 'page') { $url = &Apache::lonnet::clutter($url); } @@ -4865,7 +4860,7 @@ sub short_urls { $r->rflush(); my $readonly; if ($canedit) { - my ($numnew,$errors) = &Apache::loncommon::make_short_symbs($cdom,$cnum,$navmap); + my ($numnew,$errors) = &Apache::loncommon::get_requested_shorturls($cdom,$cnum,$navmap); if ($numnew) { $r->print('

'.&mt('Created [quant,_1,URL]',$numnew).'

'); } @@ -4900,7 +4895,7 @@ sub contentverifyform { &mt('No').''.(' 'x2). '

'. - ''. + ''. ''. '

'); $r->print(&endContentScreen()); @@ -6590,13 +6585,19 @@ NSYLFORM $help{'Group Portfolio'} NGFFORM - @specialdocumentsforma=( + if ($container eq 'page') { + @specialdocumentsforma=( + {''.$lt{webp}.''=>$newwebpageform}, + ); + } else { + @specialdocumentsforma=( {''.$lt{newp}.''=>$newpageform}, {''.$lt{syll}.''=>$newsylform}, {''.$lt{navc}.''=>$newnavform}, {''.$lt{sipa}.''=>$newsmppageform}, {''.$lt{webp}.''=>$newwebpageform}, - ); + ); + } $specialdocumentsform = &create_form_ul(&create_list_elements(@specialdocumentsforma)); my @external = ( @@ -6642,11 +6643,11 @@ my %orderhash = ( 'bb' => ['Import',$importpubform], 'cc' => ['External',$externalform], 'dd' => ['Grading',$gradingform], + 'ff' => ['Other',$specialdocumentsform], ); unless ($container eq 'page') { $orderhash{'00'} = ['Newfolder',$newfolderform]; $orderhash{'ee'} = ['Collaboration',$communityform]; - $orderhash{'ff'} = ['Other',$specialdocumentsform]; } $hadchanges=0;