--- loncom/interface/lonsimplepage.pm 2004/05/12 18:53:35 1.19 +++ loncom/interface/lonsimplepage.pm 2005/02/17 08:29:43 1.23 @@ -1,7 +1,7 @@ # The LearningOnline Network # Simple Page Editor # -# $Id: lonsimplepage.pm,v 1.19 2004/05/12 18:53:35 sakharuk Exp $ +# $Id: lonsimplepage.pm,v 1.23 2005/02/17 08:29:43 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -46,8 +46,9 @@ sub handler { my $target=$ENV{'form.grade_target'}; # ------------------------------------------------------------ Print the screen if ($target ne 'tex') { + my $html=&Apache::lonxml::xmlbegin(); $r->print(< +$html The LearningOnline Network with CAPA ENDDOCUMENT @@ -104,7 +105,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 +140,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; } @@ -151,14 +156,13 @@ ENDDOCUMENT if ($syllabus{'uploaded.photourl'}) { &Apache::lonnet::allowuploaded('/adm/smppg', $syllabus{'uploaded.photourl'}); - - if ($target ne 'tex') { - $r->print(''); - } else { - $r->print(&Apache::lonxml::xmlparse($r,'tex','')); + + my $image=''; + if ($target eq 'tex') { + $image=&Apache::lonxml::xmlparse($r,'tex',$image); } + $r->print($image); } if ($allowed) { $r->print( @@ -176,6 +180,9 @@ ENDDOCUMENT $message =~s/(https*\:\/\/[^\s]+)/\\$1\<\/tt\>\<\/a\>/g; $message=&Apache::lontexconvert::msgtexconverted($message); + if ($allowed) { + $message=&Apache::lonspeller::markeduptext($message); + } unless ($_ eq 'aaa_title') { if (($_ ne 'bbb_content') || ($allowed)) { if ($target ne 'tex') { @@ -194,7 +201,7 @@ ENDDOCUMENT } if ($allowed) { if ($target ne 'tex') { - $r->print('
'); } else { @@ -224,7 +231,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 {