version 1.93, 2017/02/20 18:29:33
|
version 1.94, 2017/02/25 19:40:29
|
Line 314 sub handler {
|
Line 314 sub handler {
|
my %multichoicehash=(); |
my %multichoicehash=(); |
my ($redirecturl,$redirectsymb,$enc,$anchor); |
my ($redirecturl,$redirectsymb,$enc,$anchor); |
my $next=''; |
my $next=''; |
|
my $hostname = $r->hostname(); |
my @possibilities=(); |
my @possibilities=(); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['postdata']); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['postdata']); |
if (($env{'form.postdata'})&&($env{'request.course.fn'})) { |
if (($env{'form.postdata'})&&($env{'request.course.fn'})) { |
Line 334 sub handler {
|
Line 335 sub handler {
|
} elsif ($direction eq 'firstanswerable') { |
} elsif ($direction eq 'firstanswerable') { |
my $furl = &first_answerable_ressymb(); |
my $furl = &first_answerable_ressymb(); |
my $usehttp = &check_for_syllabus(\$furl); |
my $usehttp = &check_for_syllabus(\$furl); |
if ($usehttp) { |
if (($usehttp) && ($hostname ne '')) { |
$furl='http://'.$ENV{'SERVER_NAME'}.$furl; |
$furl='http://'.$hostname.$furl; |
} else { |
} else { |
$furl=&Apache::lonnet::absolute_url().$furl; |
$furl=&Apache::lonnet::absolute_url().$furl; |
} |
} |
Line 387 sub handler {
|
Line 388 sub handler {
|
if ($direction eq 'firstres') { |
if ($direction eq 'firstres') { |
my $furl=&first_accessible_resource(); |
my $furl=&first_accessible_resource(); |
my $usehttp = &check_for_syllabus(\$furl); |
my $usehttp = &check_for_syllabus(\$furl); |
if ($usehttp) { |
if (($usehttp) && ($hostname ne '')) { |
$furl='http://'.$ENV{'SERVER_NAME'}.$furl; |
$furl='http://'.$hostname.$furl; |
} else { |
} else { |
$furl=&Apache::lonnet::absolute_url().$furl; |
$furl=&Apache::lonnet::absolute_url().$furl; |
} |
} |
Line 418 sub handler {
|
Line 419 sub handler {
|
} else { |
} else { |
$newloc='/adm/navmaps'; |
$newloc='/adm/navmaps'; |
} |
} |
if ($usehttp) { |
if (($usehttp) && ($hostname ne '')) { |
$newloc='http://'.$ENV{'SERVER_NAME'}.$newloc; |
$newloc='http://'.$hostname.$newloc; |
} else { |
} else { |
$newloc=&Apache::lonnet::absolute_url().$newloc |
$newloc=&Apache::lonnet::absolute_url().$newloc |
} |
} |
Line 529 sub handler {
|
Line 530 sub handler {
|
my ($redirect, $url) = &Apache::loncommon::critical_redirect(300); |
my ($redirect, $url) = &Apache::loncommon::critical_redirect(300); |
unless ($redirect) { |
unless ($redirect) { |
my $usehttp = &check_for_syllabus(\$redirecturl); |
my $usehttp = &check_for_syllabus(\$redirecturl); |
if ($usehttp) { |
if (($usehttp) && ($hostname ne '')) { |
$url='http://'.$ENV{'SERVER_NAME'}.$redirecturl; |
$url='http://'.$hostname.$redirecturl; |
} else { |
} else { |
$url=&Apache::lonnet::absolute_url().$redirecturl; |
$url=&Apache::lonnet::absolute_url().$redirecturl; |
} |
} |
Line 584 ENDSTART
|
Line 585 ENDSTART
|
foreach my $id (@possibilities) { |
foreach my $id (@possibilities) { |
my $src = $multichoicehash{'src_'.$id}; |
my $src = $multichoicehash{'src_'.$id}; |
my $usehttp = &check_for_syllabus(\$src); |
my $usehttp = &check_for_syllabus(\$src); |
if ($usehttp) { |
if (($usehttp) && ($hostname ne '')) { |
$src = 'http://'.$ENV{'SERVER_NAME'}.$src; |
$src = 'http://'.$hostname.$src; |
} |
} |
$r->print( |
$r->print( |
'<tr><td><a href="'. |
'<tr><td><a href="'. |