--- loncom/interface/lonwhatsnew.pm 2005/12/22 02:38:44 1.41 +++ loncom/interface/lonwhatsnew.pm 2005/12/22 03:39:39 1.42 @@ -1,5 +1,5 @@ # -# $Id: lonwhatsnew.pm,v 1.41 2005/12/22 02:38:44 raeburn Exp $ +# $Id: lonwhatsnew.pm,v 1.42 2005/12/22 03:39:39 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -62,10 +62,11 @@ sub handler { $r->send_http_header; my $crsid = $env{'request.course.id'}; $crsid =~ s/_/\//; - if ((!($env{'request.course.id'})) || - ($env{'request.role'} !~ /\Q$crsid\E$/)) { + if ((!($env{'request.course.fn'})) || + (!(&Apache::lonnet::allowed('whn', + $env{'request.course.id'})))) { # Not in a course, or no role in course - $env{'user.error.msg'}="/adm/whatsnew::0:0:Cannot display what's new screen"; + $env{'user.error.msg'}="/adm/whatsnew::whn:0:0:Cannot display what's new page"; return HTTP_NOT_ACCEPTABLE; }