version 1.27, 2014/05/20 20:30:59
|
version 1.30, 2015/03/01 20:47:54
|
Line 1
|
Line 1
|
# The LearningOnline Network with CAPA |
# The LearningOnline Network with CAPA |
|
# Navigate Maps Display Handler |
# |
# |
# $Id$ |
# $Id$ |
# |
# |
Line 38 use Apache::lonhtmlcommon();
|
Line 38 use Apache::lonhtmlcommon();
|
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::londocs(); |
use Apache::londocs(); |
#use Time::HiRes qw( gettimeofday tv_interval ); |
|
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
Line 47 sub handler {
|
Line 46 sub handler {
|
|
|
sub real_handler { |
sub real_handler { |
my $r = shift; |
my $r = shift; |
#my $t0=[&gettimeofday()]; |
|
# Handle header-only request |
# Handle header-only request |
if ($r->header_only) { |
if ($r->header_only) { |
if ($env{'browser.mathml'}) { |
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/xml'); |
|
} else { |
|
&Apache::loncommon::content_type($r,'text/html'); |
|
} |
|
$r->send_http_header; |
$r->send_http_header; |
return OK; |
return OK; |
} |
} |
Line 67 sub real_handler {
|
Line 61 sub real_handler {
|
return REDIRECT; |
return REDIRECT; |
} |
} |
|
|
|
|
|
|
# Send header, don't cache this page |
|
if ($env{'browser.mathml'}) { |
|
&Apache::loncommon::content_type($r,'text/xml'); |
|
} else { |
|
&Apache::loncommon::content_type($r,'text/html'); |
|
} |
|
&Apache::loncommon::no_cache($r); |
|
|
|
my %toplinkitems=(); |
|
|
|
# Create the nav map |
# Create the nav map |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
|
|
Line 88 sub real_handler {
|
Line 70 sub real_handler {
|
$env{'user.reinit'} = 1; |
$env{'user.reinit'} = 1; |
return HTTP_NOT_ACCEPTABLE; |
return HTTP_NOT_ACCEPTABLE; |
} |
} |
|
|
|
# Send header, don't cache this page |
|
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
|
|
# ------------------------------------------------------------ Get query string |
# ------------------------------------------------------------ Get query string |
Line 127 sub real_handler {
|
Line 112 sub real_handler {
|
return OK; |
return OK; |
} |
} |
|
|
|
my %toplinkitems=(); |
my @resources = $navmap->retrieveResources(); |
my @resources = $navmap->retrieveResources(); |
my $sequenceCount = 0; |
my $sequenceCount = 0; |
my $problemCount = 0; |
my $problemCount = 0; |
Line 293 sub real_handler {
|
Line 279 sub real_handler {
|
$r->print("<p><span class=\"LC_info\">".&mt("This course is empty.")."</span></p>"); |
$r->print("<p><span class=\"LC_info\">".&mt("This course is empty.")."</span></p>"); |
} |
} |
} |
} |
#my $td=&tv_interval($t0); |
|
#$r->print("<br />$td"); |
|
&endContentScreen($r); |
&endContentScreen($r); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
$r->rflush(); |
$r->rflush(); |