[LON-CAPA-cvs] cvs: rat / lonpageflip.pm

bowersj2 lon-capa-cvs@mail.lon-capa.org
Mon, 02 Dec 2002 14:39:02 -0000


bowersj2		Mon Dec  2 09:39:02 2002 EDT

  Modified files:              
    /rat	lonpageflip.pm 
  Log:
  Corrects bug 825. Clicking next after selecting a choice from lonpageflip
  now works, as the symb is no longer lost.
  
  
Index: rat/lonpageflip.pm
diff -u rat/lonpageflip.pm:1.31 rat/lonpageflip.pm:1.32
--- rat/lonpageflip.pm:1.31	Thu Oct 10 15:05:32 2002
+++ rat/lonpageflip.pm	Mon Dec  2 09:39:02 2002
@@ -2,7 +2,7 @@
 #
 # Page flip handler
 #
-# $Id: lonpageflip.pm,v 1.31 2002/10/10 19:05:32 www Exp $
+# $Id: lonpageflip.pm,v 1.32 2002/12/02 14:39:02 bowersj2 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -261,6 +261,12 @@
 			  $multichoicehash{'src_'.$_}=$hash{'src_'.$_};
                           $multichoicehash{'title_'.$_}=$hash{'title_'.$_};
                           $multichoicehash{'type_'.$_}=$hash{'type_'.$_};
+                          (my $first, my $second) = $_ =~ /(\d+).(\d+)/;
+                          my $symbSrc = Apache::lonnet::declutter($hash{'src_'.$_});
+                          $multichoicehash{'symb_'.$_} = 
+                              Apache::lonnet::declutter($hash{'map_id_'.$first}.'___'.
+                                                        $second.'___'.$symbSrc);
+                                                         
                           my ($choicemap,$choiceres)=split(/\./,$_);
                           $cachehash
 			 {&Apache::lonnet::declutter($hash{'src_'.$choicemap})}
@@ -322,7 +328,8 @@
                      foreach (@possibilities) {
                         $r->print(
                               '<tr><td><a href="'.
-                              $multichoicehash{'src_'.$_}.'">'.
+                              $multichoicehash{'src_'.$_}.'?symb=' .
+                                  Apache::lonnet::escape($multichoicehash{'symb_'.$_}).'">'.
                               $multichoicehash{'title_'.$_}.
                               '</a></td><td>'.$multichoicehash{'type_'.$_}.
 			      '</td></tr>');