--- loncom/interface/lonaboutme.pm 2008/12/17 00:44:53 1.87 +++ loncom/interface/lonaboutme.pm 2009/02/13 17:26:55 1.93 @@ -1,7 +1,7 @@ # The LearningOnline Network # "About Me" Personal Information # -# $Id: lonaboutme.pm,v 1.87 2008/12/17 00:44:53 ehlerst Exp $ +# $Id: lonaboutme.pm,v 1.93 2009/02/13 17:26:55 neumanie Exp $ # # Copyright Michigan State University Board of Trustees # @@ -86,6 +86,7 @@ use Apache::lonlocal; use Apache::lonmsgdisplay(); use Apache::lontemplate; use HTML::Entities(); +use Image::Magick; sub handler { my $r = shift; @@ -280,16 +281,21 @@ my $image; if (($syllabus{'uploaded.lastmodified'}) || ($allowed)) { $lastmod=$syllabus{'uploaded.lastmodified'}; $lastmod=($lastmod?&Apache::lonlocal::locallocaltime($lastmod):&mt('never')); - $r->print('
'.&mt('Last updated').': '.$lastmod); + $r->print('
'.&mt('Last updated').': '.$lastmod); if ($syllabus{'uploaded.photourl'}) { &Apache::lonnet::allowuploaded('/adm/aboutme', $syllabus{'uploaded.photourl'}); - $image=qq{}; + + #This call is to resize all "about me" 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); } - # $r->print($image); #Print old Image + } if ($allowed) { $r->print( @@ -298,7 +304,7 @@ my $image; ''. ''. ''. - '
+ '

'); } @@ -307,32 +313,35 @@ my $image; $r->print('

'); } - &Apache::lontemplate::start_columnSection($r); - &Apache::lontemplate::print_content_template($r,$allowed,$target,\%syllabusfields,\%syllabus); - if($target ne 'tex') - { - &Apache::lontemplate::start_ContentBox($r); - $r->print($image); + if($target ne 'tex') #print Image + { + &Apache::lontemplate::start_ContentBox($r); &Apache::lontemplate::send_message($r,$cnum,$cdom); &Apache::lontemplate::end_ContentBox($r); - &Apache::lontemplate::end_columnSection($r); - - &Apache::lontemplate::start_columnSection($r); - &Apache::lontemplate::start_ContentBox($r); + $r->print($image); + + }#End Print Image + + #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 + { + &print_portfiles_link($r,$is_course); if(&Apache::lonrss::advertisefeeds($cnum,$cdom) ne ''){ - $r->print('
'); - $r->print('

'.'RSS Feeds and Blogs'.'

'); + $r->print('
'); + $r->print('

'.'RSS Feeds and Blogs'.'

'); $r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom)); $r->print('
'); - } - &Apache::lontemplate::end_ContentBox($r); - &Apache::lontemplate::end_columnSection($r); + } + if($allowed){ $r->print('

'.&mt('Show Public View').''. &Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView').'

'); } - } + }#End Print RSS and portfiles if ($allowed) { if ($env{'form.popup'}) { $r->print('

'; + $output = '

'; $output .= ($is_course?$lt{'vgpf'}:$lt{'vpfi'}).'

'; #$output = '

'.($is_course?$lt{'vgpf'}:$lt{'vpfi'}).'

'; @@ -763,7 +769,7 @@ sub parse_directory { ' '.$showname.''; $output.=''; if ($have_meta) { - $output.= ''.&mt('Catalog Information').''.&mt('Metadata').''; }