--- loncom/interface/lonbulletin.pm 2004/05/10 14:10:03 1.23 +++ loncom/interface/lonbulletin.pm 2005/02/17 08:29:42 1.28 @@ -1,7 +1,7 @@ # The LearningOnline Network # Bulletin Board Handler # -# $Id: lonbulletin.pm,v 1.23 2004/05/10 14:10:03 sakharuk Exp $ +# $Id: lonbulletin.pm,v 1.28 2005/02/17 08:29:42 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -42,14 +42,12 @@ sub handler { $r->send_http_header; return OK if $r->header_only; my $target=$ENV{'form.grade_target'}; - &Apache::lonnet::logthis("MY TARGET IS DEFINED AS $target"); - -# &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['previous']); # ------------------------------------------------------------ Print the screen if ($target ne 'tex') { + my $html=&Apache::lonxml::xmlbegin(); $r->print(< +$html The LearningOnline Network with CAPA ENDDOCUMENT @@ -81,13 +79,18 @@ ENDDOCUMENT # ------------------------------------------------------------ Get Query String &Apache::loncommon::get_unprocessed_cgi - ($ENV{'QUERY_STRING'},['forcestudent','forceedit','register']); + ($ENV{'QUERY_STRING'},['forcestudent','forceedit','register','origpage']); # ----------------------------------------------------- Force menu registration my $addentries=''; if ($ENV{'form.register'}) { - $addentries=' onLoad="'.&Apache::lonmenu::loadevents(). - '" onUnload="'.&Apache::lonmenu::unloadevents().'"'; + $addentries=' onLoad="'.&Apache::lonmenu::loadevents(); + if ($ENV{'form.origpage'}) { + $addentries .= "document.location='#newpost';"; + } + $addentries .= '" onUnload="'.&Apache::lonmenu::unloadevents().'"'; $r->print(&Apache::lonmenu::registerurl(1)); + } elsif ($ENV{'form.origpage'}) { + $addentries = "onLoad=\"document.location='#newpost';\""; } # --------------------------------------------------------------- Force Student my $forcestudent=''; @@ -110,7 +113,7 @@ ENDDOCUMENT if (($syllabus{'uploaded.lastmodified'}) && (!$forceedit)) { $forcestudent='student'; } - + if ($target ne 'tex') { $r->print('
'); } if ($forcestudent or $target eq 'tex') { $allowed=0; } if ($allowed) { @@ -170,7 +173,10 @@ ENDDOCUMENT $message =~s/(https*\:\/\/[^\s]+)/\\$1\<\/tt\>\<\/a\>/g; $message=&Apache::lontexconvert::msgtexconverted($message); - unless ($_ eq 'aaa_title') { + if ($allowed) { + $message=&Apache::lonspeller::markeduptext($message); + } + unless ($_ eq 'aaa_title') { if (($_ ne 'bbb_content') || ($allowed)) { if ($target ne 'tex') { $r->print('

'.$syllabusfields{$_}.'

'); @@ -211,6 +217,7 @@ ENDDOCUMENT } else { $r->print('

'.&mt('No page information provided.').'

'); } + if ($target ne 'tex') { $r->print('
'); } if ($target ne 'tex') { $r->print(&Apache::lonfeedback::list_discussion ('board','OPEN','bulletin___'.$marker.'___'.