[LON-CAPA-cvs] cvs: loncom /interface lonnavmaps.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 16 Mar 2006 20:48:31 -0000
albertel Thu Mar 16 15:48:31 2006 EDT
Modified files:
/loncom/interface lonnavmaps.pm
Log:
- page start end generalize
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.370 loncom/interface/lonnavmaps.pm:1.371
--- loncom/interface/lonnavmaps.pm:1.370 Tue Mar 14 17:17:55 2006
+++ loncom/interface/lonnavmaps.pm Thu Mar 16 15:48:30 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.370 2006/03/14 22:17:55 albertel Exp $
+# $Id: lonnavmaps.pm,v 1.371 2006/03/16 20:48:30 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -194,10 +194,7 @@
MENU
}
$r->send_http_header;
- my $html=&Apache::lonxml::xmlbegin();
- $r->print(<<"ENDSUBM");
- $html
- <head>
+ my $js =<<"ENDSUBM";
<script type="text/javascript">
function submitthis() {
$menu
@@ -205,10 +202,12 @@
}
</script>
- </head>
- <body bgcolor="#FFFFFF" onLoad="submitthis()"></body>
- </html>
ENDSUBM
+ $r->print(&Apache::lonxml::xmlbegin().
+ &Apache::loncommon::head(undef,$js).
+ '<body bgcolor="#FFFFFF" onLoad="submitthis()">'.
+ &Apache::loncommon::end_page(undef,$js));
+
return OK;
}
if ($ENV{QUERY_STRING} =~ /^launchExternal/) {
@@ -239,9 +238,7 @@
return HTTP_NOT_ACCEPTABLE;
}
$r->send_http_header;
- my $html=&Apache::lonxml::xmlbegin();
- $r->print("$html<head>\n");
- $r->print("<title>".&mt('Navigate Course Contents')."</title>");
+
# ------------------------------------------------------------ Get query string
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['register','sort','showOnlyHomework','postsymb']);
@@ -249,12 +246,13 @@
my $addentries='';
my $more_unload;
my $body_only='';
+ my $js;
if ($env{'environment.remotenavmap'} eq 'on') {
- $r->print('<script type="text/javascript">
- function collapse() {
- this.document.location="/adm/navmaps?collapseExternal";
- }
- </script>');
+ $js='<script type="text/javascript">
+ function collapse() {
+ this.document.location="/adm/navmaps?collapseExternal";
+ }
+ </script>';
# FIXME need to be smarter to only catch window close events
# $more_unload="collapse()"
$body_only=1;
@@ -269,7 +267,8 @@
}
# Header
- $r->print('</head>'.
+ $r->print(&Apache::lonxml::xmlbegin().
+ &Apache::loncommon::head('Navigate Course Contents',$js).
&Apache::loncommon::bodytag('Navigate Course Contents','',
$addentries,$body_only,'',
$env{'form.register'}));
@@ -281,7 +280,7 @@
if (!($navmap->courseMapDefined())) {
$r->print(&Apache::loncommon::help_open_menu('','Navigation Screen','Navigation_Screen','',undef,'RAT'));
$r->print('<font size="+2" color="red">Coursemap undefined.</font>' .
- '</body></html>');
+ &Apache::loncommon::end_page());
return OK;
}
@@ -434,7 +433,7 @@
#my $td=&tv_interval($t0);
#$r->print("<br />$td");
- $r->print("</body></html>");
+ $r->print(&Apache::loncommon::end_page());
$r->rflush();
return OK;