Diff for /rat/lonpageflip.pm between versions 1.18 and 1.19

version 1.18, 2001/11/29 19:23:49 version 1.19, 2002/04/11 01:57:36
Line 205  sub handler { Line 205  sub handler {
       if ($position=Apache::lonnet::symbread($currenturl)) {        if ($position=Apache::lonnet::symbread($currenturl)) {
 # ------------------------------------------------------------------------- Yes  # ------------------------------------------------------------------------- Yes
   my ($mapurl,$mapnum,$thisurl)=split(/\_\_\_/,$position);    my ($mapurl,$mapnum,$thisurl)=split(/\_\_\_/,$position);
           $cachehash{$thisurl}=$mapnum;            $cachehash{$mapurl}{$thisurl}=$mapnum;
 # ============================================================ Tie the big hash  # ============================================================ Tie the big hash
           if (tie(%hash,'GDBM_File',$ENV{'request.course.fn'}.'.db',            if (tie(%hash,'GDBM_File',$ENV{'request.course.fn'}.'.db',
                         &GDBM_READER,0640)) {                          &GDBM_READER,0640)) {
Line 227  sub handler { Line 227  sub handler {
                   if ($#possibilities==0) {                    if ($#possibilities==0) {
 # ---------------------------------------------- Only one possibility, redirect  # ---------------------------------------------- Only one possibility, redirect
               $redirecturl=$hash{'src_'.$next};                $redirecturl=$hash{'src_'.$next};
                       $cachehash{&Apache::lonnet::declutter($redirecturl)}                        $cachehash{$mapurl}
                                   {&Apache::lonnet::declutter($redirecturl)}
                                  =(split(/\./,$next))[1];                                   =(split(/\./,$next))[1];
                   } else {                    } else {
 # ------------------------ There are multiple possibilities for a next resource  # ------------------------ There are multiple possibilities for a next resource
Line 236  sub handler { Line 237  sub handler {
   $multichoicehash{'src_'.$_}=$hash{'src_'.$_};    $multichoicehash{'src_'.$_}=$hash{'src_'.$_};
                           $multichoicehash{'title_'.$_}=$hash{'title_'.$_};                            $multichoicehash{'title_'.$_}=$hash{'title_'.$_};
                           $multichoicehash{'type_'.$_}=$hash{'type_'.$_};                            $multichoicehash{'type_'.$_}=$hash{'type_'.$_};
                           $cachehash                            $cachehash{$mapurl}
                             {&Apache::lonnet::declutter(                              {&Apache::lonnet::declutter(
       $multichoicehash        $multichoicehash
                                                          {'src_'.$_}                                                           {'src_'.$_}
Line 251  sub handler { Line 252  sub handler {
 # ----------------- The program must come past this point to untie the big hash  # ----------------- The program must come past this point to untie the big hash
       untie(%hash);        untie(%hash);
 # --------------------------------------------------------- Store position info  # --------------------------------------------------------- Store position info
               $cachehash{'last_direction'}=$direction;                $cachehash{$mapurl}{'last_direction'}=$direction;
               $cachehash{'last_known'}=&Apache::lonnet::declutter($currenturl);                $cachehash{$mapurl}{'last_known'}=
               &Apache::lonnet::symblist($mapurl,%cachehash);                                         &Apache::lonnet::declutter($currenturl);
                 foreach my $thismap (keys %cachehash) {
                    &Apache::lonnet::symblist($thismap,%{$cachehash{$thisurl}});
         }
 # ============================================== Do not return before this line  # ============================================== Do not return before this line
               if ($redirecturl) {                if ($redirecturl) {
 # ----------------------------------------------------- There is a URL to go to  # ----------------------------------------------------- There is a URL to go to

Removed from v.1.18  
changed lines
  Added in v.1.19


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