Diff for /loncom/interface/londocs.pm between versions 1.484.2.93.2.5 and 1.484.2.93.2.6

version 1.484.2.93.2.5, 2023/01/18 22:38:46 version 1.484.2.93.2.6, 2023/01/19 03:27:48
Line 4145  END Line 4145  END
                     $nomodal = 1;                      $nomodal = 1;
                 }                  }
     }      }
             if (&Apache::lonnet::symbverify($symb,$url)) {              my ($checkencrypt,$shownurl);
                 $shownsymb = $symb;              if (!$env{'request.role.adv'}) {
                 if ($isexternal) {  
                     $url =~ s/\#[^#]+$//;  
                     if ($container eq 'page') {  
                         $url = &Apache::lonnet::clutter($url);  
                     }  
                 }  
                 unless ($env{'request.role.adv'}) {  
                     if ((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i) {  
                         $url = '';  
                     }  
                     if (&Apache::lonnet::EXT('resource.0.hiddenresource',$symb) =~ /^yes$/i) {  
                         $url = '';  
                         $hiddenres = 1;  
                     }  
                 }  
                 if ($url ne '') {  
                     $url.=(($url=~/\?/)?'&':'?').'symb='.&escape($shownsymb);  
                 }  
             } elsif (!$env{'request.role.adv'}) {  
                 my $checkencrypt;  
                 if (((&LONCAPA::map::getparameter($orderidx,'parameter_encrypturl'))[0]=~/^yes$/i) ||                  if (((&LONCAPA::map::getparameter($orderidx,'parameter_encrypturl'))[0]=~/^yes$/i) ||
                       $isencrypted || (&Apache::lonnet::EXT('resource.0.encrypturl',$symb) =~ /^yes$/i)) {                      ($isencrypted) || (&Apache::lonnet::EXT('resource.0.encrypturl',$symb) =~ /^yes$/i)) {
                     $checkencrypt = 1;                      $checkencrypt = 1;
                 } elsif (ref($navmapref)) {                  } elsif (ref($navmapref)) {
                     unless (ref($$navmapref)) {                      unless (ref($$navmapref)) {
Line 4180  END Line 4160  END
                         }                          }
                     }                      }
                 }                  }
                 if ($checkencrypt) {              }
                     $shownsymb = &Apache::lonenc::encrypted($symb);              if ($checkencrypt) {
                     my $shownurl = &Apache::lonenc::encrypted($url);                  my $currenc = $env{'request.enc'};
                     if (&Apache::lonnet::symbverify($shownsymb,$shownurl)) {                  $env{'request.enc'} = 1;
                         $url = $shownurl.(($shownurl=~/\?/)?'&':'?').'symb='.&escape($shownsymb);                  $shownsymb = &Apache::lonenc::encrypted($symb);
                         if ($env{'request.enc'} ne '') {                  $shownurl = &Apache::lonenc::encrypted($url);
                             delete($env{'request.enc'});                  if (&Apache::lonnet::symbverify($symb,$url)) {
                         }                      $url = $shownurl;
                     } else {  
                         $url='';  
                     }  
                 } else {                  } else {
                     $url='';                      $url = '';
                   }
                   $env{'request.enc'} = $currenc;
               } elsif (&Apache::lonnet::symbverify($symb,$url)) {
                   $shownsymb = $symb;
                   if ($isexternal) {
                       $url =~ s/\#[^#]+$//;
                       if ($container eq 'page') {
                           $url = &Apache::lonnet::clutter($url);
                       }
                 }                  }
             } else {                  $shownurl = $url;
                 $url='';              }
               unless ($env{'request.role.adv'}) {
                   if ((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i) {
                       $url = '';
                   }
                   if (&Apache::lonnet::EXT('resource.0.hiddenresource',$symb) =~ /^yes$/i) {
                       $url = '';
                       $hiddenres = 1;
                   }
               }
               if ($url ne '') {
                   $url = $shownurl.(($shownurl=~/\?/)?'&':'?').'symb='.&escape($shownsymb);
             }              }
  }   }
     } elsif ($supplementalflag) {      } elsif ($supplementalflag) {

Removed from v.1.484.2.93.2.5  
changed lines
  Added in v.1.484.2.93.2.6


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