[LON-CAPA-cvs] cvs: loncom /interface lonmodifycourse.pm lonmsg.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 16 Mar 2006 21:39:26 -0000
albertel Thu Mar 16 16:39:26 2006 EDT
Modified files:
/loncom/interface lonmsg.pm lonmodifycourse.pm
Log:
- page genearizlzation
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.176 loncom/interface/lonmsg.pm:1.177
--- loncom/interface/lonmsg.pm:1.176 Wed Mar 15 16:55:43 2006
+++ loncom/interface/lonmsg.pm Thu Mar 16 16:39:26 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging
#
-# $Id: lonmsg.pm,v 1.176 2006/03/15 21:55:43 albertel Exp $
+# $Id: lonmsg.pm,v 1.177 2006/03/16 21:39:26 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2082,17 +2082,15 @@
sub header {
my ($r,$title,$baseurl)=@_;
- $r->print(&Apache::lonxml::xmlbegin().
- '<head>'.&Apache::lonxml::fontsettings().
- '<title>Communication and Messages</title>'.
- &Apache::lonhtmlcommon::htmlareaheaders());
+
+ my $extra = &Apache::loncommon::studentbrowser_javascript();
if ($baseurl) {
- $r->print("<base href=\"http://$ENV{'SERVER_NAME'}/$baseurl\" />");
+ $extra .= "<base href=\"http://$ENV{'SERVER_NAME'}/$baseurl\" />";
}
- $r->print(&Apache::loncommon::studentbrowser_javascript().'</head>'.
- &Apache::loncommon::bodytag('Communication and Messages'));
- $r->print(&Apache::lonhtmlcommon::breadcrumbs
- (undef,($title?$title:'Communication and Messages')));
+ $r->print(&Apache::loncommon::start_page('Communication and Messages',
+ $extra));
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs
+ (undef,($title?$title:'Communication and Messages')));
}
@@ -2125,8 +2123,8 @@
my ($r)=@_;
my %msgs=&Apache::lonnet::dump('nohist_stored_comments',undef,undef,
'^'.&Apache::lonnet::escape(&Apache::lonnet::escape($env{'form.showcommentbaseurl'})));
- $r->print(&Apache::lonxml::xmlbegin().'<head>'.
- &Apache::lonxml::fontsettings().'</head><body>');
+ $r->print(&Apache::loncommon::start_page('Stored Comment Listing',undef,
+ {'onlybody' => 1}));
if ((keys %msgs)[0]=~/^error\:/) {
$r->print(&mt('No stored comments yet.'));
} else {
@@ -2475,7 +2473,7 @@
&Apache::loncommunicate::menu($r);
&disall($r,($folder?$folder:$dismode));
}
- $r->print(&Apache::loncommon::endbodytag().'</html>');
+ $r->print(&Apache::loncommon::end_page());
return OK;
}
# ================================================= Main program, reset counter
Index: loncom/interface/lonmodifycourse.pm
diff -u loncom/interface/lonmodifycourse.pm:1.22 loncom/interface/lonmodifycourse.pm:1.23
--- loncom/interface/lonmodifycourse.pm:1.22 Fri Feb 10 18:38:15 2006
+++ loncom/interface/lonmodifycourse.pm Thu Mar 16 16:39:26 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# automated enrollment course setup handler
#
-# $Id: lonmodifycourse.pm,v 1.22 2006/02/10 23:38:15 albertel Exp $
+# $Id: lonmodifycourse.pm,v 1.23 2006/03/16 21:39:26 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -674,20 +674,15 @@
}
}
my $html=&Apache::lonxml::xmlbegin();
- $r->print("
-$html
-<head>
-");
+ my $js;
if ($action eq 'display') {
- $r->print("
-<script language=\"JavaScript\" type=\"text/javascript\">
-$$javascriptref
-</script>");
+ $js = '<script type="text/javascript">
+ '.$$javascriptref.'
+ </script>';
}
+ $r->print(&Apache::loncommon::start_page('View/Modify Course Settings',
+ $js));
$r->print(<<ENDTHIS);
-<title>The LearningOnline Network with CAPA</title>
-</head>
-$bodytag
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#CCCC99">
@@ -703,12 +698,8 @@
}
sub print_footer {
- my $r = shift;
- $r->print(<<ENDBASE);
-<br/>
-</body>
-</html>
-ENDBASE
+ my ($r) = @_;
+ $r->print('<br />'.&Apache::loncommon::end_page());
return;
}