version 1.108, 2021/08/06 01:27:04
|
version 1.115, 2025/02/07 20:46:01
|
Line 126 sub move {
|
Line 126 sub move {
|
} |
} |
$deeplinkonly = 0; |
$deeplinkonly = 0; |
if ($hash{'deeplinkonly_'.$next}) { |
if ($hash{'deeplinkonly_'.$next}) { |
my ($value,$level) = split(/:/,$hash{'deeplinkonly_'.$next}); |
my ($value,$level) = map { &unescape($_); } split(/:/,$hash{'deeplinkonly_'.$next}); |
my ($state,$others,$listed,$scope,$protect) = split(/,/,$value); |
my ($state,$others,$listed,$scope,$protect) = split(/,/,$value); |
unless (($state eq 'both') || ($hash{'is_map_'.$next})) { |
unless (($state eq 'both') || ($hash{'is_map_'.$next})) { |
if ($level eq 'resource') { |
if ($level eq 'resource') { |
Line 160 sub move {
|
Line 160 sub move {
|
} |
} |
} |
} |
} elsif (($hash{'deeplinkonly_'.$prev}) && (!$firstres)) { |
} elsif (($hash{'deeplinkonly_'.$prev}) && (!$firstres)) { |
my ($value,$level) = split(/:/,$hash{'deeplinkonly_'.$prev}); |
my ($value,$level) = map { &unescape($_); } split(/:/,$hash{'deeplinkonly_'.$prev}); |
my ($state,$others,$listed,$scope,$protect) = split(/,/,$value); |
my ($state,$others,$listed,$scope,$protect) = split(/,/,$value); |
unless (($state eq 'both') || ($hash{'is_map_'.$prev})) { |
unless (($state eq 'both') || ($hash{'is_map_'.$prev})) { |
if ($level eq 'resource') { |
if ($level eq 'resource') { |
Line 425 sub get_deeplink_login_pc {
|
Line 425 sub get_deeplink_login_pc {
|
if (($env{'request.deeplink.login'}) && ($env{'request.course.id'})) { |
if (($env{'request.deeplink.login'}) && ($env{'request.course.id'})) { |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
if ($env{'request.deeplink.login'}) { |
my $deeplink_symb = &Apache::loncommon::deeplink_login_symb($cnum,$cdom); |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
if ($deeplink_symb) { |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $loginmap; |
my $deeplink_symb = &Apache::loncommon::deeplink_login_symb($cnum,$cdom); |
if ($deeplink_symb =~ /\.(page|sequence)$/) { |
if ($deeplink_symb) { |
$loginmap = &Apache::lonnet::clutter((&Apache::lonnet::decode_symb($deeplink_symb))[2]); |
my $loginmap; |
} else { |
if ($deeplink_symb =~ /\.(page|sequence)$/) { |
$loginmap = &Apache::lonnet::clutter((&Apache::lonnet::decode_symb($deeplink_symb))[0]); |
$loginmap = &Apache::lonnet::clutter((&Apache::lonnet::decode_symb($deeplink_symb))[2]); |
|
} else { |
|
$loginmap = &Apache::lonnet::clutter((&Apache::lonnet::decode_symb($deeplink_symb))[0]); |
|
} |
|
$deeplink_login_pc = $hash{'map_pc_'.$loginmap}; |
|
} |
} |
|
$deeplink_login_pc = $hash{'map_pc_'.$loginmap}; |
} |
} |
} |
} |
return $deeplink_login_pc; |
return $deeplink_login_pc; |
Line 506 sub handler {
|
Line 502 sub handler {
|
$r->send_http_header; |
$r->send_http_header; |
$r->print(&Apache::loncommon::check_release_result(@reinit)); |
$r->print(&Apache::loncommon::check_release_result(@reinit)); |
return OK; |
return OK; |
} elsif ($reinitcheck eq 'update') { |
} |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
my ($cnum,$cdom); |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
if ($reinitcheck) { |
|
$cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
|
$cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
|
} |
|
if (($reinitcheck eq 'main') || ($reinitcheck eq 'both')) { |
$preupdatepos = &Apache::lonnet::symbread($currenturl); |
$preupdatepos = &Apache::lonnet::symbread($currenturl); |
unless ($direction eq 'return') { |
unless ($direction eq 'return') { |
if (tie(%hash,'GDBM_File',$env{'request.course.fn'}.'_symb.db', |
if (tie(%hash,'GDBM_File',$env{'request.course.fn'}.'_symb.db', |
Line 544 sub handler {
|
Line 544 sub handler {
|
} |
} |
} |
} |
} |
} |
|
if (($reinitcheck eq 'both') || ($reinitcheck eq 'supp')) { |
|
my $possdel; |
|
if ($reinitcheck eq 'supp') { |
|
$possdel = 1; |
|
} |
|
my ($supplemental,$refs_updated) = &Apache::loncommon::get_supplemental($cnum,$cdom,'',$possdel); |
|
unless ($refs_updated) { |
|
&Apache::loncommon::set_supp_httprefs($cnum,$cdom,$supplemental); |
|
} |
|
} |
} |
} |
if ($direction eq 'firstres') { |
if ($direction eq 'firstres') { |
my $furl=&first_accessible_resource(); |
my $furl=&first_accessible_resource(); |
Line 553 sub handler {
|
Line 563 sub handler {
|
} else { |
} else { |
$furl=&Apache::lonnet::absolute_url().$furl; |
$furl=&Apache::lonnet::absolute_url().$furl; |
} |
} |
if ($reinitcheck eq 'update') { |
if (($reinitcheck eq 'main') || ($reinitcheck eq 'both')) { |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
$r->print(&reinited_js($furl,$env{'request.course.id'},100)); |
$r->print(&reinited_js($furl,$env{'request.course.id'},100)); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
Line 595 sub handler {
|
Line 605 sub handler {
|
} else { |
} else { |
$newloc=&Apache::lonnet::absolute_url().$newloc |
$newloc=&Apache::lonnet::absolute_url().$newloc |
} |
} |
if ($reinitcheck eq 'update') { |
if (($reinitcheck eq 'main') || ($reinitcheck eq 'both')) { |
$r->print(&reinited_js($newloc,$env{'request.course.id'},100)); |
$r->print(&reinited_js($newloc,$env{'request.course.id'},100)); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
return OK; |
return OK; |
Line 622 sub handler {
|
Line 632 sub handler {
|
} else { |
} else { |
my $newloc = &Apache::lonnet::absolute_url(). |
my $newloc = &Apache::lonnet::absolute_url(). |
'/adm/navmaps'; |
'/adm/navmaps'; |
if ($reinitcheck eq 'update') { |
if (($reinitcheck eq 'main') || ($reinitcheck eq 'both')) { |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
$r->print(&reinited_js($newloc,$env{'request.course.id'},100)); |
$r->print(&reinited_js($newloc,$env{'request.course.id'},100)); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
Line 694 sub handler {
|
Line 704 sub handler {
|
my $mapid = $hash{'map_pc_'.&Apache::lonnet::clutter($map)}; |
my $mapid = $hash{'map_pc_'.&Apache::lonnet::clutter($map)}; |
my $position_deeplink = $hash{'deeplinkonly_'.$mapid.'.'.$resid}; |
my $position_deeplink = $hash{'deeplinkonly_'.$mapid.'.'.$resid}; |
if ($position_deeplink) { |
if ($position_deeplink) { |
(my $value,$deeplinklevel) = split(/:/,$position_deeplink); |
(my $value,$deeplinklevel) = map { &unescape($_); } |
|
split(/:/,$position_deeplink); |
} |
} |
} |
} |
} |
} |
Line 736 sub handler {
|
Line 747 sub handler {
|
$url .= $anchor; |
$url .= $anchor; |
} |
} |
} |
} |
if ($reinitcheck eq 'update') { |
if (($reinitcheck eq 'main') || ($reinitcheck eq 'both')) { |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
$r->print(&reinited_js($url,$env{'request.course.id'},100)); |
$r->print(&reinited_js($url,$env{'request.course.id'},100)); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
Line 839 ENDSTART
|
Line 850 ENDSTART
|
} |
} |
} |
} |
} |
} |
unless (($env{'course.'.$env{'request.course.id'}.'.type'} eq 'Placement') || |
unless (($env{'course.'.$env{'request.course.id'}.'.type'} eq 'Placement') && |
($env{'request.role.adv'})) { |
(!$env{'request.role.adv'})) { |
if ($deeplinklevel) { |
if ($deeplinklevel) { |
$r->print( |
$r->print( |
&Apache::lonhtmlcommon::actionbox( |
&Apache::lonhtmlcommon::actionbox( |
Line 865 ENDSTART
|
Line 876 ENDSTART
|
} |
} |
} else { |
} else { |
# ------------------------------------------------- Problem, could not tie hash |
# ------------------------------------------------- Problem, could not tie hash |
if ($reinitcheck eq 'update') { |
if (($reinitcheck eq 'main') || ($reinitcheck eq 'both')) { |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
} |
} |
Line 875 ENDSTART
|
Line 886 ENDSTART
|
} else { |
} else { |
# ---------------------------------------- No, could not determine where we are |
# ---------------------------------------- No, could not determine where we are |
my $newloc = '/adm/ambiguous'; |
my $newloc = '/adm/ambiguous'; |
if ($reinitcheck eq 'update') { |
if (($reinitcheck eq 'main') || ($reinitcheck eq 'both')) { |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
$r->print(&reinited_js($newloc,$env{'request.course.id'},100)); |
$r->print(&reinited_js($newloc,$env{'request.course.id'},100)); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |