version 1.63, 2006/02/07 19:46:08
|
version 1.65, 2006/03/06 23:35:43
|
Line 98 sub move {
|
Line 98 sub move {
|
$rid=$hash{'ids_'.$hash{'map_id_'.(split(/\./,$rid))[0]}}; |
$rid=$hash{'ids_'.$hash{'map_id_'.(split(/\./,$rid))[0]}}; |
} |
} |
foreach my $id (split(/\,/,$hash{'to_'.$rid})) { |
foreach my $id (split(/\,/,$hash{'to_'.$rid})) { |
my $thiscond= |
my $condition= $hash{'conditions_'.$hash{'goesto_'.$id}}; |
&Apache::lonnet::directcondval($hash{'condid_'.$hash{'undercond_'.$id}}); |
my $rescond = &Apache::lonnet::docondval($condition); |
if ($thiscond>=$mincond) { |
my $linkcond = &Apache::lonnet::directcondval($hash{'condid_'.$hash{'undercond_'.$id}}); |
|
my $thiscond = ($rescond<$linkcond)?$rescond:$linkcond; |
|
if ($thiscond>=$mincond) { |
if ($posnext) { |
if ($posnext) { |
$posnext.=','.$id.':'.$thiscond; |
$posnext.=','.$id.':'.$thiscond; |
} else { |
} else { |
Line 138 sub move {
|
Line 140 sub move {
|
$rid=$hash{'ids_'.$hash{'map_id_'.(split(/\./,$rid))[0]}}; |
$rid=$hash{'ids_'.$hash{'map_id_'.(split(/\./,$rid))[0]}}; |
} |
} |
foreach my $id (split(/\,/,$hash{'from_'.$rid})) { |
foreach my $id (split(/\,/,$hash{'from_'.$rid})) { |
my $thiscond= |
my $condition= $hash{'conditions_'.$hash{'comesfrom_'.$id}}; |
&Apache::lonnet::directcondval($hash{'condid_'.$hash{'undercond_'.$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 ($thiscond>=$mincond) { |
if ($posnext) { |
if ($posnext) { |
$posnext.=','.$id.':'.$thiscond; |
$posnext.=','.$id.':'.$thiscond; |
Line 395 sub handler {
|
Line 399 sub handler {
|
|
|
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
my $url='http://'.$ENV{'HTTP_HOST'}.$redirecturl; |
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); |
$r->header_out(Location => $url); |
return REDIRECT; |
return REDIRECT; |
} else { |
} else { |
Line 429 ENDSTART
|
Line 433 ENDSTART
|
foreach my $id (@possibilities) { |
foreach my $id (@possibilities) { |
$r->print( |
$r->print( |
'<tr><td><a href="'. |
'<tr><td><a href="'. |
$multichoicehash{'src_'.$id}.'?symb=' . |
$multichoicehash{'src_'.$id}.($multichoicehash{'src_'.$id}=~/\?/?'&':'?').'symb=' . |
Apache::lonnet::escape($multichoicehash{'symb_'.$id}).'">'. |
Apache::lonnet::escape($multichoicehash{'symb_'.$id}).'">'. |
$multichoicehash{'title_'.$id}. |
$multichoicehash{'title_'.$id}. |
'</a></td><td>'.$multichoicehash{'type_'.$id}. |
'</a></td><td>'.$multichoicehash{'type_'.$id}. |