--- loncom/auth/lonroles.pm 2006/05/30 12:45:24 1.149 +++ loncom/auth/lonroles.pm 2006/05/30 17:15:00 1.150 @@ -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.150 2006/05/30 17:15:00 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -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 ").