--- loncom/interface/lonaboutme.pm 2005/04/07 06:56:22 1.37 +++ loncom/interface/lonaboutme.pm 2006/03/21 21:14:43 1.40 @@ -1,7 +1,7 @@ # The LearningOnline Network # "About Me" Personal Information # -# $Id: lonaboutme.pm,v 1.37 2005/04/07 06:56:22 albertel Exp $ +# $Id: lonaboutme.pm,v 1.40 2006/03/21 21:14:43 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -34,6 +34,7 @@ use Apache::loncommon; use Apache::lonnet; use Apache::lontexconvert; use Apache::lonfeedback; +use Apache::lonrss(); use Apache::lonlocal; sub handler { @@ -43,21 +44,14 @@ sub handler { 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(< -The LearningOnline Network with CAPA -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(''. - &mt('No user information available').''); + &Apache::loncommon::simple_error_page($r,'No info', + 'No user information available'); return OK; } # --------------------------------------------------------- The syllabus fields @@ -83,9 +77,14 @@ ENDDOCUMENT # --------------------------------------- There is such a user, get environment my %courseenv=&Apache::lonnet::dump('environment',$cdom,$cnum); if ($target ne 'tex') { - $r->print(''.&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('

'.&Apache::loncommon::plainname($cnum,$cdom).'

'); } else { $r->print('\noindent{\large\textbf{'.&Apache::loncommon::plainname($cnum,$cdom).'}}\\\\\\\\'); @@ -97,7 +96,7 @@ ENDDOCUMENT } if ($target ne 'tex') { $r->print('

'.$Apache::lonnet::domaindescription{$cdom}.'

'. - '

'.&Apache::loncommon::messagewrapper('Send me a message',$cnum,$cdom).'

'); + '

'.&Apache::loncommon::messagewrapper('Send me a message',$cnum,$cdom).'

'.&Apache::lonrss::advertisefeeds($cnum,$cdom)); } else { $r->print('\textbf{'.$Apache::lonnet::domaindescription{$cdom}.'}\\\\'); } @@ -181,7 +180,7 @@ ENDDOCUMENT foreach (sort keys %syllabusfields) { if (($syllabus{$_}) || ($allowed)) { my $message=$syllabus{$_}; - $message=~s/\n/\
/g; + &Apache::lonfeedback::newline_to_br(\$message); $message =~s/(http\:\/\/[^\s]+)/\\$1\<\/tt\>\<\/a\>/g; if ($allowed) { @@ -237,7 +236,11 @@ ENDDOCUMENT } } } - if ($target ne 'tex') {$r->print('');} else {$r->print('\end{document}');} + if ($target ne 'tex') { + $r->print(&Apache::loncommon::end_page()); + } else { + $r->print('\end{document}'); + } return OK; }