--- loncom/auth/lonroles.pm 2006/05/30 12:45:24 1.149 +++ loncom/auth/lonroles.pm 2006/05/30 19:47:36 1.151 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.149 2006/05/30 12:45:24 www Exp $ +# $Id: lonroles.pm,v 1.151 2006/05/30 19:47:36 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -39,8 +39,8 @@ use Apache::loncommon; use Apache::lonhtmlcommon; use Apache::lonannounce; use Apache::lonlocal; +use Apache::lonpageflip(); use GDBM_File; -use lib '/home/httpd/lib/perl/'; use LONCAPA; @@ -77,6 +77,21 @@ ENDREDIR return; } +sub error_page { + my ($r,$error,$dest)=@_; + &Apache::loncommon::content_type($r,'text/html'); + &Apache::loncommon::no_cache($r); + $r->send_http_header; + return OK if $r->header_only; + $r->print(&Apache::loncommon::start_page('Problems during Course Initialization'). + ''. + '

'.&mt('The following problems occurred:'). + $error. + '


print("

".&mt('Assigned User Roles')."

\n"); - } else { - $r->print("

".&mt('Sorry ...')."

\n". - &mt('This resource might be part of')); - if ($env{'request.course.id'}) { - $r->print(&mt(' another')); - } else { - $r->print(&mt(' a certain')); - } - $r->print(&mt(' course.'). - &Apache::loncommon::end_page()); - return OK; - } + $r->print("

".&mt('Sorry ...')."

\n". + &mt('This action is currently not authorized.'). + &Apache::loncommon::end_page()); + return OK; } else { if ($advanced) { $r->print(&mt("Your home server is ").