--- loncom/interface/lonsimplepage.pm 2004/05/11 18:43:21 1.18 +++ loncom/interface/lonsimplepage.pm 2004/06/03 14:28:39 1.21 @@ -1,7 +1,7 @@ # The LearningOnline Network # Simple Page Editor # -# $Id: lonsimplepage.pm,v 1.18 2004/05/11 18:43:21 sakharuk Exp $ +# $Id: lonsimplepage.pm,v 1.21 2004/06/03 14:28:39 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -104,7 +104,8 @@ ENDDOCUMENT # --------------------------------------- There is such a user, get environment if ($target ne 'tex') { - $r->print(''.&Apache::loncommon::bodytag + $r->print(&Apache::lonhtmlcommon::htmlareaheaders(). + ''.&Apache::loncommon::bodytag ("Course Page",$forcestudent,$addentries,'',$dom,$ENV{'form.register'})); } @@ -138,7 +139,10 @@ ENDDOCUMENT if (($allowed) && ($ENV{'form.storesyl'})) { foreach (keys %syllabusfields) { my $field=$ENV{'form.'.$_}; + chomp($field); $field=~s/\s+$//s; + $field=~s/^\s+//s; + $field=~s/\$//s; $field=&Apache::lonfeedback::clear_out_html($field,1); $syllabus{$_}=$field; } @@ -149,17 +153,15 @@ ENDDOCUMENT # ---------------------------------------------------------------- Get syllabus if (($syllabus{'uploaded.lastmodified'}) || ($allowed)) { if ($syllabus{'uploaded.photourl'}) { - if ($target ne 'tex') { - &Apache::lonnet::allowuploaded('/adm/smppg', - $syllabus{'uploaded.photourl'}); - $r->print(''); - } else { - &Apache::lonnet::allowuploaded('/adm/smppg', - $syllabus{'uploaded.photourl'}); - $r->print(&Apache::lonxml::xmlparse($r,'tex','')); + &Apache::lonnet::allowuploaded('/adm/smppg', + $syllabus{'uploaded.photourl'}); + + my $image=''; + if ($target eq 'tex') { + $image=&Apache::lonxml::xmlparse($r,'tex',$image); } + $r->print($image); } if ($allowed) { $r->print( @@ -195,7 +197,7 @@ ENDDOCUMENT } if ($allowed) { if ($target ne 'tex') { - $r->print('
'); } else { @@ -225,7 +227,8 @@ ENDDOCUMENT } } if ($allowed && ($ENV{'form.grade_target'} ne 'tex')) { - $r->print(''); + $r->print(&Apache::lonhtmlcommon::htmlareaselectactive + ('bbb_content').''); } if ($ENV{'form.grade_target'} ne 'tex') {$r->print('

');} } else {