version 1.25, 2014/02/28 19:20:06
|
version 1.29, 2015/03/01 20:42:08
|
Line 1
|
Line 1
|
# The LearningOnline Network with CAPA |
# The LearningOnline Network with CAPA |
# Navigate Maps Handler |
# Navigate Maps Display Handler |
# |
# |
# $Id$ |
# $Id$ |
# |
# |
Line 30
|
Line 30
|
package Apache::lonnavdisplay; |
package Apache::lonnavdisplay; |
|
|
use strict; |
use strict; |
use Apache::Constants qw(:common :http); |
use Apache::Constants qw(:common :http REDIRECT); |
use Apache::lonmenu(); |
use Apache::lonmenu(); |
use Apache::loncommon(); |
use Apache::loncommon(); |
use Apache::lonnavmaps(); |
use Apache::lonnavmaps(); |
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'}) { |
if ($env{'browser.mathml'}) { |
Line 59 sub real_handler {
|
Line 57 sub real_handler {
|
return OK; |
return OK; |
} |
} |
|
|
|
# Check for critical messages and redirect if present. |
|
my ($redirect,$url) = &Apache::loncommon::critical_redirect(300); |
|
if ($redirect) { |
|
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->header_out(Location => $url); |
|
return REDIRECT; |
|
} |
|
|
|
|
|
|
# Send header, don't cache this page |
# Send header, don't cache this page |
if ($env{'browser.mathml'}) { |
if ($env{'browser.mathml'}) { |
&Apache::loncommon::content_type($r,'text/xml'); |
&Apache::loncommon::content_type($r,'text/xml'); |
Line 100 sub real_handler {
|
Line 108 sub real_handler {
|
$start_page = &Apache::loncommon::start_page($title,undef,$args); |
$start_page = &Apache::loncommon::start_page($title,undef,$args); |
} |
} |
$r->print($start_page. |
$r->print($start_page. |
'<script type="text/javascript">window.focus();</script>'); |
'<script type="text/javascript">'."\n". |
|
'// <![CDATA['."\n". |
|
'window.focus();'."\n". |
|
'// ]]>'."\n". |
|
'</script>'); |
&startContentScreen($r,'navmaps'); |
&startContentScreen($r,'navmaps'); |
$r->rflush(); |
$r->rflush(); |
|
|
Line 279 sub real_handler {
|
Line 291 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(); |