[LON-CAPA-cvs] cvs: loncom /interface lonaboutme.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 21 Mar 2006 21:14:44 -0000
albertel Tue Mar 21 16:14:44 2006 EDT
Modified files:
/loncom/interface lonaboutme.pm
Log:
- start_page
Index: loncom/interface/lonaboutme.pm
diff -u loncom/interface/lonaboutme.pm:1.39 loncom/interface/lonaboutme.pm:1.40
--- loncom/interface/lonaboutme.pm:1.39 Fri Nov 18 08:35:30 2005
+++ loncom/interface/lonaboutme.pm Tue Mar 21 16:14:43 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network
# "About Me" Personal Information
#
-# $Id: lonaboutme.pm,v 1.39 2005/11/18 13:35:30 www Exp $
+# $Id: lonaboutme.pm,v 1.40 2006/03/21 21:14:43 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -44,21 +44,14 @@
return OK if $r->header_only;
my $target=$env{'form.grade_target'};
# ------------------------------------------------------------ Print the screen
- if ($target ne 'tex') {
- my $html=&Apache::lonxml::xmlbegin();
- $r->print(<<ENDDOCUMENT);
-$html
-<head>
-<title>The LearningOnline Network with CAPA</title>
-ENDDOCUMENT
- } else {
+ if ($target eq 'tex') {
$r->print(&Apache::lonprintout::print_latex_header($env{'form.latex_type'}));
}
my (undef,undef,$cdom,$cnum)=split(/\//,$r->uri);
# Is this even a user?
if (&Apache::lonnet::homeserver($cnum,$cdom) eq 'no_host') {
- $r->print('</head><body>'.
- &mt('No user information available').'</body></html>');
+ &Apache::loncommon::simple_error_page($r,'No info',
+ 'No user information available');
return OK;
}
# --------------------------------------------------------- The syllabus fields
@@ -84,9 +77,14 @@
# --------------------------------------- There is such a user, get environment
my %courseenv=&Apache::lonnet::dump('environment',$cdom,$cnum);
if ($target ne 'tex') {
- $r->print('</head>'.&Apache::loncommon::bodytag
- ("Personal Information",$forcestudent,$addentries,'',$cdom,
- $env{'form.register'}));
+ my $start_page =
+ &Apache::loncommon::start_page("Personal Information",undef,
+ {'function' => $forcestudent,
+ 'add_entries' => $addentries,
+ 'domain' => $cdom,
+ 'force_register' =>
+ $env{'form.register'},});
+ $r->print($start_page);
$r->print('<h1>'.&Apache::loncommon::plainname($cnum,$cdom).'</h1>');
} else {
$r->print('\noindent{\large\textbf{'.&Apache::loncommon::plainname($cnum,$cdom).'}}\\\\\\\\');
@@ -238,7 +236,11 @@
}
}
}
- if ($target ne 'tex') {$r->print('</body></html>');} else {$r->print('\end{document}');}
+ if ($target ne 'tex') {
+ $r->print(&Apache::loncommon::end_page());
+ } else {
+ $r->print('\end{document}');
+ }
return OK;
}