Diff for /loncom/interface/londocs.pm between versions 1.657 and 1.660

version 1.657, 2018/12/27 20:10:31 version 1.660, 2019/04/11 14:22:35
Line 1819  sub do_paste_from_buffer { Line 1819  sub do_paste_from_buffer {
 # Retrieve information about all course maps in main content area   # Retrieve information about all course maps in main content area 
   
     my $allmaps = {};      my $allmaps = {};
     if ($folder =~ /^default/) {      my (@toclear,%mapurls,%lockerrs,%msgerrs,%results,$donechk);
         $allmaps =  
             &Apache::loncommon::allmaps_incourse($coursedom,$coursenum,  
                                                  $env{"course.$env{'request.course.id'}.home"},  
                                                  $env{'request.course.id'});  
     }  
   
     my (@toclear,%mapurls,%lockerrs,%msgerrs,%results);  
   
 # Loop over the items to paste  # Loop over the items to paste
     foreach my $suffix (@dopaste) {      foreach my $suffix (@dopaste) {
Line 1844  sub do_paste_from_buffer { Line 1837  sub do_paste_from_buffer {
         if ($is_map{$suffix}) {          if ($is_map{$suffix}) {
 # If pasting a map, check if map contains other maps  # If pasting a map, check if map contains other maps
             my (%hierarchy,%titles);              my (%hierarchy,%titles);
               if (($folder =~ /^default/) && (!$donechk)) {
                   $allmaps =
                       &Apache::loncommon::allmaps_incourse($coursedom,$coursenum,
                                                            $env{"course.$env{'request.course.id'}.home"},
                                                            $env{'request.course.id'});
                   $donechk = 1;
               }
             &contained_map_check($url,$folder,$coursenum,$coursedom,              &contained_map_check($url,$folder,$coursenum,$coursedom,
                                  \%removefrommap,\%removeparam,\%addedmaps,                                   \%removefrommap,\%removeparam,\%addedmaps,
                                  \%hierarchy,\%titles,$allmaps);                                   \%hierarchy,\%titles,$allmaps);
Line 4183  END Line 4183  END
                     if ($url =~ /^([^#]+)#([^#]+)$/) {                      if ($url =~ /^([^#]+)#([^#]+)$/) {
                         $url = $1;                          $url = $1;
                         $anchor = $2;                          $anchor = $2;
                         if ($symb =~ m{^([^#]+)\Q#$anchor\E$}) {                          my $escan = &escape('#');
                             $shownsymb = $1.&escape('#').$anchor;                          $shownsymb =~ s/^([^\#]+)#([^\#]+)$/$1$escan$2/;
                         }  
                     }                      }
                 }                  }
                 unless ($env{'request.role.adv'}) {                  unless ($env{'request.role.adv'}) {
Line 4437  $form_end; Line 4436  $form_end;
        } else {         } else {
            $link = $url;             $link = $url;
        }         }
        $link = &js_escape($link.(($url=~/\?/)?'&':'?').'inhibitmenu=yes'.         $link = &js_escape($link.(($url=~/\?/)?'&':'?').'inhibitmenu=yes'.$anchor);
                                                (($anchor ne '')?$anchor:''));  
        if ($nomodal) {         if ($nomodal) {
            $line.='<a href="#" onclick="javascript:window.open('."'$link','syllabuspreview','height=400,width=500,scrollbars=1,resizable=1,menubar=0,location=1')".'; return false;" />'.             $line.='<a href="#" onclick="javascript:window.open('."'$link','syllabuspreview','height=400,width=500,scrollbars=1,resizable=1,menubar=0,location=1')".'; return false;" />'.
                   '<img src="'.$icon.'" alt="" class="LC_icon" border="0" /></a>';                    '<img src="'.$icon.'" alt="" class="LC_icon" border="0" /></a>';
Line 7289  sub editing_js { Line 7287  sub editing_js {
                 } elsif ($backtourl =~ m{^/adm/wrapper/ext/(?!https:)}) {                  } elsif ($backtourl =~ m{^/adm/wrapper/ext/(?!https:)}) {
                     if (($ENV{'SERVER_PORT'} == 443) && ($hostname ne '')) {                      if (($ENV{'SERVER_PORT'} == 443) && ($hostname ne '')) {
                         unless (&Apache::lonnet::uses_sts()) {                          unless (&Apache::lonnet::uses_sts()) {
                             $backtourl = 'http://'.$hostname.$backtourl;                              if ($hostname ne '') {
                                   $backtourl = 'http://'.$hostname.$backtourl;
                               }
                               $backtourl .= (($backtourl =~ /\?/) ? '&amp;':'?').'usehttp=1';
                         }                          }
                     }                      }
                 }                  }

Removed from v.1.657  
changed lines
  Added in v.1.660


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>