version 1.10, 2003/09/22 03:02:06
|
version 1.11, 2004/12/17 22:40:24
|
Line 67 sub getlost {
|
Line 67 sub getlost {
|
|
|
# ================================================================ Main Handler |
# ================================================================ Main Handler |
|
|
|
sub make_symb { |
|
my ($id)=@_; |
|
my ($mapid,$resid)=split(/\./,$id); |
|
my $map=$bighash{'map_id_'.$mapid}; |
|
my $res=$bighash{'src_'.$id}; |
|
my $symb=&Apache::lonnet::encode_symb($map,$resid,$res); |
|
return $symb; |
|
} |
|
|
sub handler { |
sub handler { |
my $r=shift; |
my $r=shift; |
|
|
Line 151 sub handler {
|
Line 160 sub handler {
|
# ------------------------------------------------------------------- Has ID(s) |
# ------------------------------------------------------------------- Has ID(s) |
my @possibilities=split(/\,/,$ids); |
my @possibilities=split(/\,/,$ids); |
my $couldbe=''; |
my $couldbe=''; |
map { |
foreach (@possibilities) { |
if (&Apache::lonnet::allowed('bre',$bighash{'src_'.$_})) { |
if ($bighash{'encrypted_'.$_}) { next; } |
|
my $symb=&make_symb($_); |
|
if (&Apache::lonnet::allowed('bre',$bighash{'src_'.$_},$symb)) { |
if ($couldbe) { |
if ($couldbe) { |
$couldbe.=','.$_; |
$couldbe.=','.$_; |
} else { |
} else { |
$couldbe=$_; |
$couldbe=$_; |
} |
} |
} |
} |
} @possibilities; |
} |
if ($couldbe) { |
if ($couldbe) { |
@possibilities=split(/\,/,$couldbe); |
@possibilities=split(/\,/,$couldbe); |
if ($#possibilities>0) { |
if ($#possibilities>0) { |
Line 176 and LON-CAPA has insufficient session in
|
Line 187 and LON-CAPA has insufficient session in
|
of the resource you meant. |
of the resource you meant. |
<p> |
<p> |
Please click on the instance of the resource you intended to access: |
Please click on the instance of the resource you intended to access: |
<p> |
</p> |
<form action="/adm/ambiguous" method=post> |
<table border="2"> |
<input type=hidden name=orgurl value="$thisfn"> |
<tr><th>Title</th><th>Part of ...</th></tr> |
<input type=hidden name=selecturl value=1> |
|
<table border=2> |
|
<tr><th> </th><th>Title</th><th>Type</th><th>Part of ...</th></tr> |
|
ENDSTART |
ENDSTART |
map { |
map { |
|
my $resurl=$bighash{'src_'.$_}; |
my $mapurl=$bighash{'map_id_'.(split(/\./,$_))[0]}; |
my $mapurl=$bighash{'map_id_'.(split(/\./,$_))[0]}; |
$r->print('<tr><td><input type=submit value=Select name="'. |
my $symb=&make_symb($_); |
$_.'"></td><td>'.$bighash{'title_'.$_}. |
$r->print('<tr><td><a href="'.$resurl.'?symb='.$symb.'">'. |
'</td><td>'.$bighash{'type_'.$_}. |
&Apache::lonnet::gettitle($symb). |
'</td><td>'. |
'</a></td><td>'. |
($mapurl=~/^\/uploaded\//?'':'<a href="'.$mapurl.'">'). |
&Apache::lonnet::gettitle($mapurl).' '. |
&Apache::lonnet::gettitle($mapurl).' '. |
'</td></tr>'); |
($mapurl=~/^\/uploaded\//?'':'</a>').'</td></tr>'); |
|
} @possibilities; |
} @possibilities; |
$r->print('</table></form></body></html>'); |
$r->print('</table></body></html>'); |
untie(%bighash); |
untie(%bighash); |
return OK; |
return OK; |
} |
} |