--- loncom/auth/lonroles.pm 2006/05/15 17:45:46 1.148 +++ 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.148 2006/05/15 17:45:46 albertel Exp $ +# $Id: lonroles.pm,v 1.150 2006/05/30 17:15:00 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -40,6 +40,9 @@ use Apache::lonhtmlcommon; use Apache::lonannounce; use Apache::lonlocal; use GDBM_File; +use lib '/home/httpd/lib/perl/'; +use LONCAPA; + sub redirect_user { my ($r,$title,$url,$msg,$launch_nav) = @_; @@ -74,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 "). @@ -990,7 +1005,7 @@ sub allcourses_row { sub recent_filename { my $area=shift; - return 'nohist_recent_'.&Apache::lonnet::escape($area); + return 'nohist_recent_'.&escape($area); } sub set_privileges {