version 1.141, 2009/10/29 14:58:33
|
version 1.145, 2010/03/18 08:56:00
|
Line 327 sub handler {
|
Line 327 sub handler {
|
&Apache::lonnet::removeuploadedurl($syllabus{'uploaded.photourl'}); |
&Apache::lonnet::removeuploadedurl($syllabus{'uploaded.photourl'}); |
} |
} |
$syllabus{'uploaded.photourl'}= |
$syllabus{'uploaded.photourl'}= |
&Apache::lonnet::userphotoupload('uploaddoc','aboutme'); |
&Apache::lonnet::userfileupload('uploaddoc',undef,'aboutme', |
|
undef,undef,undef,undef,undef,undef,undef,'400','500'); |
} |
} |
$syllabus{'uploaded.lastmodified'}=time; |
$syllabus{'uploaded.lastmodified'}=time; |
&Apache::lonnet::put('aboutme',\%syllabus,$cdom,$cnum); |
&Apache::lonnet::put('aboutme',\%syllabus,$cdom,$cnum); |
Line 356 sub handler {
|
Line 357 sub handler {
|
if ($syllabus{'uploaded.photourl'}) { |
if ($syllabus{'uploaded.photourl'}) { |
&Apache::lonnet::allowuploaded('/adm/aboutme',$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|<img name="userPhoto" src="$syllabus{'uploaded.photourl'} " class="LC_AboutMe_Image" alt="Photo of the user" />|; |
$image=qq|<img name="userPhoto" src="$syllabus{'uploaded.photourl'} " class="LC_AboutMe_Image" alt="Photo of the user" />|; |
|
|
if ($target eq 'tex') { |
if ($target eq 'tex') { |
$image=&Apache::lonxml::xmlparse($r,'tex',$image); |
$image=&Apache::lonxml::xmlparse($r,'tex',$image); |
} |
} |
|
|
} |
} |
|
|
if ($allowed) { |
if ($allowed) { |
$r->print( |
$r->print( |
'<form name="UploadPhoto" method="post" enctype="multipart/form-data" action="">'. |
'<form name="UploadPhoto" method="post" enctype="multipart/form-data" action="">'. |
'<h3>'.&mt('Upload a Photo').'</h3>'. |
'<h3>'.&mt('Upload a Photo').'</h3>'. |
|
'<p class="LC_info">'. |
|
&mt('LON-CAPA will automatically scale your uploaded file so the image will not exceed a width of 400px and a height of 500px.').'</p>'. |
'<input type="file" name="uploaddoc" size="50" />'. |
'<input type="file" name="uploaddoc" size="50" />'. |
'<input type="submit" name="storeupl" value="'.&mt('Upload').'" />'. |
'<input type="submit" name="storeupl" value="'.&mt('Upload').'" />'. |
'<input type="hidden" name="popup" value="'.$env{'form.popup'}.'" />'. |
'<input type="hidden" name="popup" value="'.$env{'form.popup'}.'" />'. |
Line 387 sub handler {
|
Line 385 sub handler {
|
} |
} |
|
|
if ($target ne 'tex') { #print Image |
if ($target ne 'tex') { #print Image |
$r->print($image); |
$r->print($image.'<div class="LC_clear_float_footer"></div>'); |
|
|
} #End Print Image |
} #End Print Image |
|
|
Line 810 sub parse_directory {
|
Line 808 sub parse_directory {
|
$output.='</td><td>'; |
$output.='</td><td>'; |
if ($have_meta) { |
if ($have_meta) { |
$output.= '<a href="'.$url.'.meta"><img alt="'.&mt('Metadata').'" src="'. |
$output.= '<a href="'.$url.'.meta"><img alt="'.&mt('Metadata').'" src="'. |
&Apache::loncommon::lonhttpdurl('/res/adm/pages/catalog.gif'). |
&Apache::loncommon::lonhttpdurl('/res/adm/pages/catalog.png'). |
'" class="LC_icon" /></a>'; |
'" class="LC_icon" /></a>'; |
} |
} |
$output .= '</td>' |
$output .= '</td>' |
Line 831 sub aboutme_access {
|
Line 829 sub aboutme_access {
|
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
if (($cdom eq '') || ($cnum eq '')) { |
if (($cdom eq '') || ($cnum eq '')) { |
my %coursehash = &coursedescription($env{'request.course.id'}); |
my %coursehash = &Apache::lonnet::coursedescription($env{'request.course.id'}); |
$cdom = $coursehash{'domain'}; |
$cdom = $coursehash{'domain'}; |
$cnum = $coursehash{'cnum'}; |
$cnum = $coursehash{'cnum'}; |
} |
} |