version 1.39, 2003/08/15 14:14:43
|
version 1.47, 2004/04/08 09:14:41
|
Line 120 sub move {
|
Line 120 sub move {
|
$hash{'map_type_'.$hash{'map_pc_'.$hash{'src_'.$next}}} eq 'sequence') { |
$hash{'map_type_'.$hash{'map_pc_'.$hash{'src_'.$next}}} eq 'sequence') { |
$mapurl=$hash{'src_'.$next}; |
$mapurl=$hash{'src_'.$next}; |
$next=$hash{'map_start_'.$hash{'src_'.$next}}; |
$next=$hash{'map_start_'.$hash{'src_'.$next}}; |
|
} elsif ( |
|
# This jumps back up from an empty sequence, to a page up one level |
|
$hash{'map_type_'.$hash{'map_pc_'.$hash{'src_'.$next}}} eq 'page') { |
|
$mapurl=$hash{'map_id_'.(split(/\./,$next))[0]}; |
} |
} |
} elsif |
} elsif |
((split(/\./,$startoutrid))[0]!=(split(/\./,$next))[0]) { |
((split(/\./,$startoutrid))[0]!=(split(/\./,$next))[0]) { |
Line 156 sub move {
|
Line 160 sub move {
|
$hash{'map_type_'.$hash{'map_pc_'.$hash{'src_'.$next}}} eq 'sequence') { |
$hash{'map_type_'.$hash{'map_pc_'.$hash{'src_'.$next}}} eq 'sequence') { |
$mapurl=$hash{'src_'.$next}; |
$mapurl=$hash{'src_'.$next}; |
$next=$hash{'map_finish_'.$hash{'src_'.$next}}; |
$next=$hash{'map_finish_'.$hash{'src_'.$next}}; |
} |
} elsif ( |
|
$hash{'map_type_'.$hash{'map_pc_'.$hash{'src_'.$next}}} eq 'page') { |
|
# This jumps back up from an empty sequence, to a page up one level |
|
$mapurl=$hash{'map_id_'.(split(/\./,$next))[0]}; |
|
} |
} elsif |
} elsif |
((split(/\./,$startoutrid))[0]!=(split(/\./,$next))[0]) { |
((split(/\./,$startoutrid))[0]!=(split(/\./,$next))[0]) { |
# This comes back up from a map (going up one level); |
# This comes back up from a map (going up one level); |
Line 189 sub handler {
|
Line 197 sub handler {
|
if (($ENV{'form.postdata'})&&($ENV{'request.course.fn'})) { |
if (($ENV{'form.postdata'})&&($ENV{'request.course.fn'})) { |
$ENV{'form.postdata'}=~/(\w+)\:(.*)/; |
$ENV{'form.postdata'}=~/(\w+)\:(.*)/; |
my $direction=$1; |
my $direction=$1; |
my $currenturl=&Apache::lonnet::unescape($2); |
my $currenturl=$2; |
|
$currenturl=~s/\.\d+\.(\w+)$/\.$1/; |
if ($direction eq 'return') { |
if ($direction eq 'return') { |
# -------------------------------------------------------- Return to last known |
# -------------------------------------------------------- Return to last known |
my $last; |
my $last; |
Line 201 sub handler {
|
Line 210 sub handler {
|
my $newloc; |
my $newloc; |
if (($last) && (tie(%hash,'GDBM_File',$ENV{'request.course.fn'}.'.db', |
if (($last) && (tie(%hash,'GDBM_File',$ENV{'request.course.fn'}.'.db', |
&GDBM_READER(),0640))) { |
&GDBM_READER(),0640))) { |
my ($murl,$fn)=split(/\_\_\_/,$last); |
my ($murl,$fn)=&Apache::lonnet::decode_symb($last); |
my $id; |
my $id; |
($murl,$id,$fn)=split(/\_\_\_/,&Apache::lonnet::symbread($fn)); |
($murl,$id,$fn)=&Apache::lonnet::decode_symb(&Apache::lonnet::symbread($fn)); |
$newloc=$hash{'src_'. |
$newloc=$hash{'src_'. |
$hash{'map_pc_'.&Apache::lonnet::clutter($murl)}.'.'.$id}; |
$hash{'map_pc_'.&Apache::lonnet::clutter($murl)}.'.'.$id}; |
unless ($newloc) { $newloc='/adm/noidea.html'; } |
unless ($newloc) { $newloc='/adm/noidea.html'; } |
Line 230 sub handler {
|
Line 239 sub handler {
|
untie(%hash); |
untie(%hash); |
} |
} |
if ($last) { |
if ($last) { |
$currenturl=&Apache::lonnet::clutter((split(/\_\_\_/,$last))[1]); |
$currenturl=&Apache::lonnet::clutter((&Apache::lonnet::decode_symb($last))[1]); |
} else { |
} else { |
$r->content_type('text/html'); |
$r->content_type('text/html'); |
$r->header_out(Location => |
$r->header_out(Location => |
Line 242 sub handler {
|
Line 251 sub handler {
|
my $position; |
my $position; |
if ($position=Apache::lonnet::symbread($currenturl)) { |
if ($position=Apache::lonnet::symbread($currenturl)) { |
# ------------------------------------------------------------------------- Yes |
# ------------------------------------------------------------------------- Yes |
my ($startoutmap,$mapnum,$thisurl)=split(/\_\_\_/,$position); |
my ($startoutmap,$mapnum,$thisurl)=&Apache::lonnet::decode_symb($position); |
$cachehash{$startoutmap}{$thisurl}=$mapnum; |
$cachehash{$startoutmap}{$thisurl}=$mapnum; |
$cachehash{$startoutmap}{'last_known'}= |
$cachehash{$startoutmap}{'last_known'}= |
&Apache::lonnet::declutter($currenturl); |
&Apache::lonnet::declutter($currenturl); |
Line 388 ENDNONE
|
Line 397 ENDNONE
|
} |
} |
} else { |
} else { |
# ---------------------------------------- No, could not determine where we are |
# ---------------------------------------- No, could not determine where we are |
$r->internal_redirect('/adm/ambiguous'); |
if ( &Apache::lonnet::mod_perl_version() == 2 ) { |
|
&Apache::lonnet::cleanenv(); |
|
} |
|
$r->internal_redirect('/adm/ambiguous'); |
} |
} |
} else { |
} else { |
# -------------------------- Class was not initialized or page fliped strangely |
# -------------------------- Class was not initialized or page fliped strangely |