--- loncom/interface/lonchat.pm 2002/09/09 21:01:58 1.4 +++ loncom/interface/lonchat.pm 2003/07/24 17:53:59 1.7 @@ -1,7 +1,7 @@ # The LearningOnline Network # Chat # -# $Id: lonchat.pm,v 1.4 2002/09/09 21:01:58 www Exp $ +# $Id: lonchat.pm,v 1.7 2003/07/24 17:53:59 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -29,18 +29,25 @@ package Apache::lonchat; use strict; -use Apache::Constants qw(:common); +use Apache::Constants qw(:common :http); +use Apache::loncommon; sub handler { my $r = shift; $r->content_type('text/html'); $r->send_http_header; return OK if $r->header_only; + if (! &Apache::lonnet::allowed('plc',$ENV{'request.course.id'}. + ($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:'') + )) { + return HTTP_NOT_ACCEPTABLE; + } if ($ENV{'form.newchat'}) { - &Apache::lonnet::chatsend($ENV{'form.newchat'},$ENV{'form.anonymous'}); + &Apache::lonnet::chatsend(&Apache::lonfeedback::clear_out_html($ENV{'form.newchat'}),$ENV{'form.anonymous'}); } # --------------------------------------------------- Print login screen header + my $latexHelp = Apache::loncommon::helpLatexCheatsheet(); $r->print(< @@ -48,6 +55,7 @@ sub handler {
+$latexHelp