--- loncom/auth/lonroles.pm 2010/10/04 17:43:24 1.240.2.17 +++ loncom/auth/lonroles.pm 2010/10/06 18:46:53 1.240.2.18 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.240.2.17 2010/10/04 17:43:24 raeburn Exp $ +# $Id: lonroles.pm,v 1.240.2.18 2010/10/06 18:46:53 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -592,6 +592,7 @@ ENDENTERKEY return OK if $r->header_only; my ($crumbtext,$pagetitle,$recent,$show_course); + $show_course=&Apache::loncommon::show_course(); 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.').'

'; if ($custommenu) { my $brcrum = {'bread_crumbs' => 1}; @@ -610,16 +611,25 @@ ENDCUSTOM $crumbtext = 'User Roles'; $pagetitle = 'My Roles'; $recent = &mt('Recent Roles'); - $show_course=&Apache::loncommon::show_course(); + my $standby=&mt('Role selected. Please stand by.'); if ($show_course) { $crumbtext = 'Courses'; $pagetitle = 'My Courses'; $recent = &mt('Recent Courses'); + $standby = &mt('Course selected. Please stand by.'); + } + my $brcrum = [{ href => '/adm/roles', + text => $crumbtext,}, + ]; + my $args; + if (($env{'user.domain'} eq 'gcitest') && (!$numdc)) { + $args = {bread_crumbs => $brcrum, + bread_crumbs_nomenu => 1}; + } else { + $args = {bread_crumbs => $brcrum}; } - my $brcrum =[{href=>"/adm/roles",text=>$crumbtext}]; + my $start_page=&Apache::loncommon::start_page($pagetitle,undef,$args); my $swinfo=&Apache::lonmenu::rawconfig(); - 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; $r->print(<print('

'.&mt('Currently no additional roles, courses or communities').'

'); } else { - $r->print('

'.&mt('Currently no active roles, courses or communities').'

'); + if ($show_course) { + if ($env{'user.domain'} eq 'gcitest') { + $r->print('

'.&mt('Currently no active Concept Tests').'

'); + } else { + $r->print('

'.&mt('Currently no active courses or communities').'

'); + } + } else { + $r->print('

'.&mt('Currently no active roles, courses or communities').'

'); + } } unless ($env{'user.domain'} eq 'gcitest') { &findcourse_advice($r); @@ -815,7 +833,15 @@ ENDSCRIPT } $r->print(''); if ($countfuture) { - $r->print(&mt('The following [quant,_1,role,roles] will become active in the future:',$countfuture)); + if ($show_course) { + if ($env{'user.domain'} eq 'gcitest') { + $r->print(&mt('The following [quant,_1,Concept Test] will be available in the future:',$countfuture)); + } else { + $r->print(&mt('The following [quant,_1,course] will become active in the future:',$countfuture)); + } + } else { + $r->print(&mt('The following [quant,_1,role,roles] will become active in the future:',$countfuture)); + } my $doheaders = &roletable_headers($r,\%roleclass,\%sortrole, $nochoose); &print_rolerows($r,$doheaders,\%roleclass,\%sortrole,\%dcroles, @@ -864,7 +890,7 @@ ENDSCRIPT } } # ----------------------------------------------------------------------- Table - unless ((!&Apache::loncommon::show_course()) || ($nochoose) || ($countactive==1)) { + unless ((!$show_course) || ($nochoose) || ($countactive==1)) { $r->print("

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

\n"); } if ($env{'form.destinationurl'}) {