--- rat/lonpageflip.pm 2006/02/07 19:46:08 1.63 +++ rat/lonpageflip.pm 2006/03/06 23:35:43 1.65 @@ -2,7 +2,7 @@ # # Page flip handler # -# $Id: lonpageflip.pm,v 1.63 2006/02/07 19:46:08 albertel Exp $ +# $Id: lonpageflip.pm,v 1.65 2006/03/06 23:35:43 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -98,9 +98,11 @@ sub move { $rid=$hash{'ids_'.$hash{'map_id_'.(split(/\./,$rid))[0]}}; } foreach my $id (split(/\,/,$hash{'to_'.$rid})) { - my $thiscond= - &Apache::lonnet::directcondval($hash{'condid_'.$hash{'undercond_'.$id}}); - if ($thiscond>=$mincond) { + my $condition= $hash{'conditions_'.$hash{'goesto_'.$id}}; + my $rescond = &Apache::lonnet::docondval($condition); + my $linkcond = &Apache::lonnet::directcondval($hash{'condid_'.$hash{'undercond_'.$id}}); + my $thiscond = ($rescond<$linkcond)?$rescond:$linkcond; + if ($thiscond>=$mincond) { if ($posnext) { $posnext.=','.$id.':'.$thiscond; } else { @@ -138,8 +140,10 @@ sub move { $rid=$hash{'ids_'.$hash{'map_id_'.(split(/\./,$rid))[0]}}; } foreach my $id (split(/\,/,$hash{'from_'.$rid})) { - my $thiscond= - &Apache::lonnet::directcondval($hash{'condid_'.$hash{'undercond_'.$id}}); + my $condition= $hash{'conditions_'.$hash{'comesfrom_'.$id}}; + my $rescond = &Apache::lonnet::docondval($condition); + my $linkcond = &Apache::lonnet::directcondval($hash{'condid_'.$hash{'undercond_'.$id}}); + my $thiscond = ($rescond<$linkcond)?$rescond:$linkcond; if ($thiscond>=$mincond) { if ($posnext) { $posnext.=','.$id.':'.$thiscond; @@ -395,7 +399,7 @@ sub handler { &Apache::loncommon::content_type($r,'text/html'); my $url='http://'.$ENV{'HTTP_HOST'}.$redirecturl; - if ($redirectsymb ne '') { $url.='?symb='.&Apache::lonnet::escape($redirectsymb); } + if ($redirectsymb ne '') { $url.=($url=~/\?/?'&':'?').'symb='.&Apache::lonnet::escape($redirectsymb); } $r->header_out(Location => $url); return REDIRECT; } else { @@ -429,7 +433,7 @@ ENDSTART foreach my $id (@possibilities) { $r->print( ''. $multichoicehash{'title_'.$id}. ''.$multichoicehash{'type_'.$id}.