--- loncom/interface/lonsimplepage.pm 2008/12/17 00:44:53 1.61 +++ loncom/interface/lonsimplepage.pm 2008/12/17 09:44:04 1.62 @@ -1,7 +1,7 @@ # The LearningOnline Network # Simple Page Editor # -# $Id: lonsimplepage.pm,v 1.61 2008/12/17 00:44:53 ehlerst Exp $ +# $Id: lonsimplepage.pm,v 1.62 2008/12/17 09:44:04 ehlerst Exp $ # # Copyright Michigan State University Board of Trustees # @@ -253,6 +253,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.storesyl'})) { foreach my $syl_field (keys(%syllabusfields)) { my $field=$env{'form.'.$syl_field}; @@ -290,7 +297,8 @@ sub handler { ''. ''. '
'. - ''); + ' +
'); } &Apache::lontemplate::start_columnSection($r); if($allowed){