--- loncom/interface/lonaboutme.pm 2009/03/20 18:20:46 1.114 +++ loncom/interface/lonaboutme.pm 2009/05/13 14:27:52 1.131 @@ -1,7 +1,7 @@ # The LearningOnline Network # Personal Information Page # -# $Id: lonaboutme.pm,v 1.114 2009/03/20 18:20:46 amueller Exp $ +# $Id: lonaboutme.pm,v 1.131 2009/05/13 14:27:52 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -144,7 +144,7 @@ sub handler { ['forceedit','forcestudent', 'register','popup']); -# ----------------------------------------------- Available Portfolio file display +# ----------------------------------------------- Available Portfolio file display if (($target ne 'tex') && ($action eq 'portfolio')) { &display_portfolio_header($r,$is_course); if ((!$is_course) && (!&Apache::lonnet::usertools_access($cnum,$cdom,'portfolio'))) { @@ -154,7 +154,7 @@ sub handler { '
'); - if ($courseenv{'nickname'}) { + if ($target ne 'tex') { + $r->print(''); + $r->print(''); + $r->print(''.&Apache::loncommon::plainname($cnum,$cdom).'
'); + $r->print('' ); + if ($courseenv{'nickname'}) { $r->print(''); if ($target ne 'tex') { + $r->print('"'.$courseenv{'nickname'}.'"
'); } - $r->print(''.&Apache::lonnet::domain($cdom,'description').'
'); - } -else{ - $r->print('\noindent{\large\textbf{'.&Apache::loncommon::plainname($cnum,$cdom).'}}\\\\\\\\'); - $r->print('\textbf{'.&Apache::lonnet::domain($cdom,'description').'}\\\\'); -} + $r->print(''.&Apache::lonnet::domain($cdom,'description').'
'); + } + else { + $r->print('\noindent{\large\textbf{'.&Apache::loncommon::plainname($cnum,$cdom).'}}\\\\\\\\'); + $r->print('\textbf{'.&Apache::lonnet::domain($cdom,'description').'}\\\\'); + } # does this user have privileges to post, etc? - - my $query_string; - - if ($allowed) { - $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.'). '
'); - } - - + + my $query_string; + if (($env{'form.uploaddoc.filename'}) && ($env{'form.storeupl'}) && ($allowed)) { if ($env{'form.uploaddoc.filename'}=~/\.(gif|jpg|png|jpeg)$/i) { @@ -305,31 +328,25 @@ else{ &Apache::lonnet::put('aboutme',\%syllabus,$cdom,$cnum); } -my $lastmod; -my $image; +my $image; # ---------------------------------------------------------------- Get syllabus if (($syllabus{'uploaded.lastmodified'}) || ($allowed)) { - $lastmod=$syllabus{'uploaded.lastmodified'}; - $lastmod=($lastmod?&Apache::lonlocal::locallocaltime($lastmod):&mt('never')); - $r->print('
'.&mt('Last updated').': '.$lastmod); - - if ($syllabus{'uploaded.photourl'}) { &Apache::lonnet::allowuploaded('/adm/aboutme', $syllabus{'uploaded.photourl'}); - + #This call is to resize all "Personal Information" images in the LonCapa System. When its done, you can remove this line. &Apache::lonnet::resizeImage(&Apache::lonnet::filelocation('',$syllabus{'uploaded.photourl'})); #---End Resize--- $image=qq{}; - + if ($target eq 'tex') { $image=&Apache::lonxml::xmlparse($r,'tex',$image); } - + } - + if ($allowed) { $r->print( '-'); - + ''); + if ($syllabus{'uploaded.photourl'}) { + $r->print('
') + } + $r->print(''); } if($allowed) { @@ -347,29 +366,28 @@ my $image; } if($target ne 'tex') #print Image - { - &Apache::lontemplate::start_ContentBox($r); + { + &Apache::lontemplate::start_ContentBox($r); &Apache::lontemplate::end_ContentBox($r); - $r->print($image); - + $r->print($image); + }#End Print Image - #Print Content eg. Contactinfo aboutme,... - &Apache::lontemplate::print_aboutme_content_template($r,$allowed,$target,\%syllabusfields,\%syllabus); + #Print Content eg. Contactinfo aboutme,... + &Apache::lontemplate::print_aboutme_content_template($r,$allowed,$target,\%syllabusfields,\%syllabus); #End Print Content - if($target ne 'tex')#Begin Print RSS and portfiles - { + if($target ne 'tex') { #Begin Print RSS and portfiles &print_portfiles_link($r,$is_course); - if(&Apache::lonrss::advertisefeeds($cnum,$cdom) ne ''){ + if (&Apache::lonrss::advertisefeeds($cnum,$cdom) ne '') { &Apache::lontemplate::print_start_template($r,'RSS Feeds and Blogs','LC_ContentBoxSpecial'); - $r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom)); - &Apache::lontemplate::print_end_template($r); - } - + $r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom)); + &Apache::lontemplate::print_end_template($r); + } + } #End Print RSS and portfiles - + if ($allowed) { if ($env{'form.popup'}) { $r->print(''); &Apache::lontemplate::print_start_template($r,&mt('User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course'),'LC_ContentBoxSpecial'); $r->print(''); $r->print(&mt('Shared by course faculty and staff').&Apache::loncommon::help_open_topic("Course_Face_To_Face_Records,Course_Critical_Message")); - $r->print('
'); -&Apache::lonmsgdisplay::disfacetoface($r,$cnum,$cdom); + $r->print('
'); + &Apache::lonmsgdisplay::disfacetoface($r,$cnum,$cdom); $r->print('
'); &Apache::lontemplate::print_end_template($r); - + } else { $r->print('\\\\\textbf{'.&mt('User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course').'}\\\\'.&mt('Shared by course faculty and staff').'\\\\\\\\'); &Apache::lonmsgdisplay::disfacetoface($r,$cnum,$cdom); } } - $r->print(''); - $r->print('
'.&mt('Close window').''); } @@ -415,8 +429,8 @@ my $image; $r->print('\end{document}'); } - - + + return OK; } @@ -468,11 +482,11 @@ sub print_portfiles_link { 'vpfi' => 'Viewable portfolio files', 'vgpf' => 'Viewable group portfolio files', 'difl' => 'Display file listing', - ); + ); if ($filecounts->{'both'} > 0) { $output = '