--- loncom/interface/lonchat.pm 2003/06/23 22:25:14 1.6 +++ loncom/interface/lonchat.pm 2005/02/17 08:29:42 1.8 @@ -1,7 +1,7 @@ # The LearningOnline Network # Chat # -# $Id: lonchat.pm,v 1.6 2003/06/23 22:25:14 albertel Exp $ +# $Id: lonchat.pm,v 1.8 2005/02/17 08:29:42 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -29,7 +29,7 @@ package Apache::lonchat; use strict; -use Apache::Constants qw(:common); +use Apache::Constants qw(:common :http); use Apache::loncommon; sub handler { @@ -37,14 +37,20 @@ sub handler { $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(&Apache::lonfeedback::clear_out_html($ENV{'form.newchat'}),$ENV{'form.anonymous'}); } # --------------------------------------------------- Print login screen header my $latexHelp = Apache::loncommon::helpLatexCheatsheet(); + my $html=&Apache::lonxml::xmlbegin(); $r->print(< +$html The LearningOnline Network with CAPA