version 1.142, 2010/01/30 18:02:27
|
version 1.143, 2010/02/21 06:21:50
|
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'}.'" />'. |