--- loncom/auth/lonroles.pm 2009/05/18 15:40:20 1.223 +++ loncom/auth/lonroles.pm 2009/05/22 17:57:03 1.225 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.223 2009/05/18 15:40:20 raeburn Exp $ +# $Id: lonroles.pm,v 1.225 2009/05/22 17:57:03 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -167,7 +167,9 @@ sub redirect_user { $r->print(< +// $navwindow

$msg

@@ -183,9 +185,12 @@ sub error_page { $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:'). + ''. + '

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


'.&mt('Continue').''. &Apache::loncommon::end_page()); @@ -367,9 +372,11 @@ sub handler { $r->print(< +// -
+ $message
@@ -390,9 +397,11 @@ ENDENTEREDKEY $r->print(< +// - + @@ -553,9 +562,18 @@ ENDENTERKEY $r->send_http_header; return OK if $r->header_only; - my $brcrum =[{href=>"/admm/roles",text=>"User Roles"}]; + my $crumbtext = 'User Roles'; + my $pagetitle = 'My Roles'; + my $recent = &mt('Recent Roles'); + my $show_course=&Apache::loncommon::show_course(); + if ($show_course) { + $crumbtext = 'Courses'; + $pagetitle = 'My Courses'; + $recent = &mt('Recent Courses'); + } + my $brcrum =[{href=>"/adm/roles",text=>$crumbtext}]; my $swinfo=&Apache::lonmenu::rawconfig(); - my $start_page=&Apache::loncommon::start_page('My Roles',undef,{bread_crumbs=>$brcrum}); + my $start_page=&Apache::loncommon::start_page($pagetitle,undef,{bread_crumbs=>$brcrum}); my $standby=&mt('Role selected. Please stand by.'); $standby=~s/\n/\\n/g; my $noscript=''.&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.').'
'.&mt('As this is not the case, most functionality in the system will be unavailable.').'

'; @@ -567,6 +585,7 @@ $start_page $noscript ENDHEADER @@ -875,7 +895,7 @@ ENDHEADER return OK; } # ----------------------------------------------------------------------- Table - unless ((!&Apache::lonmenu::show_course()) || ($nochoose) || ($countactive==1)) { + unless ((!&Apache::loncommon::show_course()) || ($nochoose) || ($countactive==1)) { $r->print("

".&mt('Select a Course to Enter')."

\n"); } my $doheaders = &roletable_headers($r,\%roleclass,\%sortrole,$nochoose); @@ -904,7 +924,7 @@ ENDHEADER if ($output) { $r->print(&Apache::loncommon::start_data_table_empty_row() .'' - .&mt('Recent Roles') + .$recent .'' .&Apache::loncommon::end_data_table_empty_row() ); @@ -962,7 +982,7 @@ ENDHEADER .''.&mt('Logout').'  ' .'' .&mt('Course Catalog') - .'

'); + .'

'); } $r->print(&Apache::loncommon::end_page()); return OK; @@ -1237,31 +1257,31 @@ sub build_roletext { } elsif ($tstatus eq 'is') { $roletext.=''. ''; } elsif ($tryagain) { $roletext.= ''. ''; } elsif ($advanced) { $roletext.= ''. ''; } elsif ($reinit) { $roletext.= ''. ''; } else { $roletext.= ''. ''; } } @@ -1428,6 +1448,7 @@ sub coursepick_jscript { ); my $verify_script = <<"END"; END return $verify_script;