--- loncom/auth/lonroles.pm 2009/05/18 15:40:20 1.223 +++ loncom/auth/lonroles.pm 2009/05/18 17:30:34 1.224 @@ -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.224 2009/05/18 17:30:34 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -553,9 +553,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.').'

'; @@ -875,7 +884,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 +913,7 @@ ENDHEADER if ($output) { $r->print(&Apache::loncommon::start_data_table_empty_row() .'' - .&mt('Recent Roles') + .$recent .'' .&Apache::loncommon::end_data_table_empty_row() ); @@ -1261,7 +1270,7 @@ sub build_roletext { $roletext.= ''. ''; } }