--- rat/lonpageflip.pm 2006/02/07 19:46:08 1.63 +++ rat/lonpageflip.pm 2006/02/23 19:29:26 1.64 @@ -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.64 2006/02/23 19:29:26 albertel 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;