--- loncom/interface/lonaboutme.pm 2010/11/01 13:35:42 1.70.4.4 +++ loncom/interface/lonaboutme.pm 2009/02/12 21:15:47 1.92 @@ -1,7 +1,7 @@ # The LearningOnline Network # "About Me" Personal Information # -# $Id: lonaboutme.pm,v 1.70.4.4 2010/11/01 13:35:42 raeburn Exp $ +# $Id: lonaboutme.pm,v 1.92 2009/02/12 21:15:47 schafran Exp $ # # Copyright Michigan State University Board of Trustees # @@ -30,7 +30,7 @@ =head1 NAME -Apache::lonaboutme +pache::lonaboutme =head1 SYNOPSIS @@ -72,6 +72,7 @@ described at http://www.lon-capa.org. =cut + package Apache::lonaboutme; use strict; @@ -83,7 +84,9 @@ use Apache::lonfeedback; use Apache::lonrss(); use Apache::lonlocal; use Apache::lonmsgdisplay(); +use Apache::lontemplate; use HTML::Entities(); +use Image::Magick; sub handler { my $r = shift; @@ -117,11 +120,11 @@ sub handler { if ($target eq 'tex') { $r->print('\noindent{\large\textbf{'.&mt('No user home page available').'}}\\\\\\\\'); } else { - $r->print(&Apache::loncommon::start_page("Personal Information Page")); - $r->print('
'.&Apache::loncommon::messagewrapper(&mt('Send me a message'),$cnum,$cdom).'
'.&Apache::lonrss::advertisefeeds($cnum,$cdom)); + $r->print(''.&mt('Privacy Note:').' '. + $query_string = &build_query_string({'forcestudent' => '1','popup' => $env{'form.popup'}}); + $r->print('
'.&mt('Privacy Note').': '. &mt('The information you submit can be viewed by anybody who is logged into LON-CAPA. Do not provide information that you are not ready to share publicly.'). - '
'. - &Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes')).''.&mt('Show Public View').''. - &Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView').'
'); + ''.&mt('Show Public View').''. + &Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView').'
'. + &Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes')).''); } elsif ($privleged && $target ne 'tex') { - my $query_string = &build_query_string({'forceedit' => '1','popup' => $env{'form.popup'}}); - $r->print(''); + $query_string = &build_query_string({'forceedit' => '1','popup' => $env{'form.popup'}}); + $r->print(''); } if (($env{'form.uploaddoc.filename'}) && ($env{'form.storeupl'}) && ($allowed)) { @@ -250,7 +251,7 @@ sub handler { &Apache::lonnet::removeuploadedurl($syllabus{'uploaded.photourl'}); } $syllabus{'uploaded.photourl'}= - &Apache::lonnet::userfileupload('uploaddoc',undef,'aboutme'); + &Apache::lonnet::userphotoupload('uploaddoc','aboutme'); } $syllabus{'uploaded.lastmodified'}=time; &Apache::lonnet::put('aboutme',\%syllabus,$cdom,$cnum); @@ -274,58 +275,70 @@ sub handler { &Apache::lonnet::put('aboutme',\%syllabus,$cdom,$cnum); } +my $lastmod; +my $image; # ---------------------------------------------------------------- Get syllabus if (($syllabus{'uploaded.lastmodified'}) || ($allowed)) { - my $lastmod=$syllabus{'uploaded.lastmodified'}; + $lastmod=$syllabus{'uploaded.lastmodified'}; $lastmod=($lastmod?&Apache::lonlocal::locallocaltime($lastmod):&mt('never')); - $r->print(&mt('Last updated').': '.$lastmod); + $r->print(''. - $message.''); - } else { - $r->print('\\\\\textbf{'.$syllabusfields{$field}.'}\\\\'. - &Apache::lonxml::xmlparse($r,'tex',$message).'\\\\'); - } - if ($allowed) { - $r->print('