--- loncom/interface/lonsimplepage.pm 2009/06/11 16:48:33 1.84 +++ loncom/interface/lonsimplepage.pm 2009/12/07 19:47:56 1.87 @@ -1,7 +1,7 @@ # The LearningOnline Network # Simple Page Editor # -# $Id: lonsimplepage.pm,v 1.84 2009/06/11 16:48:33 bisitz Exp $ +# $Id: lonsimplepage.pm,v 1.87 2009/12/07 19:47:56 amueller Exp $ # # Copyright Michigan State University Board of Trustees # @@ -232,13 +232,13 @@ sub handler { $syllabus{'uploaded.lastmodified'}=time; &Apache::lonnet::put($db_name,\%syllabus,$dom,$crs); } - if ($allowed && $env{'form.delupl'}) { - if ($syllabus{'uploaded.photourl'}) { - &Apache::lonnet::removeuploadedurl($syllabus{'uploaded.photourl'}); - delete($syllabus{'uploaded.photourl'}); - &Apache::lonnet::del('simplepage',['uploaded.photourl']); - } - } +# if ($allowed && $env{'form.delupl'}) { +# if ($syllabus{'uploaded.photourl'}) { +# &Apache::lonnet::removeuploadedurl($syllabus{'uploaded.photourl'}); +# delete($syllabus{'uploaded.photourl'}); +# &Apache::lonnet::del('simplepage',['uploaded.photourl']); +# } +# } if (($allowed) && ($env{'form.storesyl'})) { foreach my $syl_field (keys(%syllabusfields)) { my $field=$env{'form.'.$syl_field}; @@ -304,8 +304,8 @@ sub handler { &Apache::lonnet::allowuploaded('/adm/smppg', $syllabus{'uploaded.photourl'}); - $image=''; + $image=''.&mt('Image').''; if ($target eq 'tex') { $image=&Apache::lonxml::xmlparse($r,'tex',$image); } @@ -313,26 +313,29 @@ sub handler { if ($allowed) { $r->print( - '
'. + ''. ''. '

'.&mt('Upload a Photo').'

'. ''. ''. - '
'. + '
'. ''); - if ($syllabus{'uploaded.photourl'}) { - $r->print('' ); - } +# if ($syllabus{'uploaded.photourl'}) { +# $r->print(''); +# } } if ($allowed) { - $r->print($image.'
 
'); + $r->print($image.''); } foreach my $field (sort(keys(%syllabusfields))) { if (($syllabus{$field}) || ($allowed) || ($field eq 'abb_links' && $group ne '')) { my $message=$syllabus{$field}; - &Apache::lonfeedback::newline_to_br(\$message); + if (!&Apache::lonfeedback::contains_block_html($message)) { + &Apache::lonfeedback::newline_to_br(\$message); + } $message=~s/(https*\:\/\/[^\s]+)/\\$1\<\/tt\>\<\/a\>/g; if ($allowed) { $message=&Apache::lonspeller::markeduptext($message);