Diff for /rat/lonpageflip.pm between versions 1.99 and 1.102

version 1.99, 2018/12/27 20:11:16 version 1.102, 2021/02/18 14:48:02
Line 320  sub check_http_req { Line 320  sub check_http_req {
         } elsif (($$srcref =~ m{^\Q/adm/wrapper/ext/\E(?!https:)}) &&          } elsif (($$srcref =~ m{^\Q/adm/wrapper/ext/\E(?!https:)}) &&
                  ($ENV{'SERVER_PORT'} == 443)) {                   ($ENV{'SERVER_PORT'} == 443)) {
             unless (&Apache::lonnet::uses_sts()) {              unless (&Apache::lonnet::uses_sts()) {
                 $$srcref .= (($$srcref =~/\?/)? '&':'?') . 'usehttp=1';                  my ($url,$anchor) = ($$srcref =~ /^([^\#]+)(?:|(\#[^\#]+))$/);
                   $$srcref = $url . (($$srcref =~/\?/)? '&':'?') . 'usehttp=1' .$anchor; 
                 $usehttp = 1;                  $usehttp = 1;
             }              }
         }          }
Line 430  sub handler { Line 431  sub handler {
               my $preamble = '<div id="LC_update_'.$env{'request.course.id'}.'" class="LC_info">'.                my $preamble = '<div id="LC_update_'.$env{'request.course.id'}.'" class="LC_info">'.
                              '<br />'.                               '<br />'.
                              &mt('Your course session is being updated because of recent changes by course personnel.').                               &mt('Your course session is being updated because of recent changes by course personnel.').
                              ' '.&mt('Please be patient.').'<br /></div>'.                               ' '.&mt('Please be patient').'.<br /></div>'.
                              '<div style="padding:0;clear:both;margin:0;border:0"></div>';                               '<div style="padding:0;clear:both;margin:0;border:0"></div>';
               %prog_state = &Apache::lonhtmlcommon::Create_PrgWin($r,undef,$preamble);                %prog_state = &Apache::lonhtmlcommon::Create_PrgWin($r,undef,$preamble);
               &Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,&mt('Updating course'));                &Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,&mt('Updating course'));
               my ($furl,$ferr) = &Apache::lonuserstate::readmap("$cdom/$cnum");                my ($furl,$ferr) = &Apache::lonuserstate::readmap("$cdom/$cnum");
               &Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,&mt('Finished'));                &Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,&mt('Finished!'));
               if ($ferr) {                if ($ferr) {
                   &Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state);                    &Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state);
                   my $requrl = $r->uri;                    my $requrl = $r->uri;
Line 471  sub handler { Line 472  sub handler {
       return REDIRECT;        return REDIRECT;
           }            }
       }        }
       if ($direction eq 'return') {         if ($direction eq 'return') {
 # -------------------------------------------------------- Return to last known  # -------------------------------------------------------- Return to last known
          my ($newloc,$usehttp);           my ($newloc,$usehttp);
          if (($last) && (tie(%hash,'GDBM_File',$env{'request.course.fn'}.'.db',           if (($last) && (tie(%hash,'GDBM_File',$env{'request.course.fn'}.'.db',
Line 483  sub handler { Line 484  sub handler {
                 $usehttp = &check_http_req(\$newloc);                  $usehttp = &check_http_req(\$newloc);
  if ($hash{'encrypted_'.$id}) {    if ($hash{'encrypted_'.$id}) { 
                     $newloc=&Apache::lonenc::encrypted($newloc);                      $newloc=&Apache::lonenc::encrypted($newloc);
                 } elsif ($newloc =~ m{^(/adm/wrapper/ext/[^\#]+)\#([^\#]+)$}) {                  }
                     $newloc = $1.&escape('#').$2;                  if ($newloc =~ m{^(/adm/wrapper/ext/[^\#]+)(?:|(\#[^\#]+))$}) {
                       my ($url,$anchor) = ($1,$2);
                       if ($anchor) {
                           $newloc = $url.(($url=~/\?/)?'&':'?').'symb='.&escape($last).$anchor;
                       }
                 }                  }
     } else {      } else {
  $newloc='/adm/navmaps';   $newloc='/adm/navmaps';
Line 520  sub handler { Line 525  sub handler {
              $last=$hash{'last_known'};               $last=$hash{'last_known'};
              untie(%hash);               untie(%hash);
          }           }
          my $newloc;  
          if ($last) {           if ($last) {
      $currenturl=&Apache::lonnet::clutter((&Apache::lonnet::decode_symb($last))[2]);       $currenturl=&Apache::lonnet::clutter((&Apache::lonnet::decode_symb($last))[2]);
  } else {   } else {

Removed from v.1.99  
changed lines
  Added in v.1.102


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