--- loncom/auth/lonroles.pm 2008/05/20 18:19:28 1.194 +++ loncom/auth/lonroles.pm 2008/07/08 20:16:16 1.200 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.194 2008/05/20 18:19:28 www Exp $ +# $Id: lonroles.pm,v 1.200 2008/07/08 20:16:16 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -501,13 +501,6 @@ ENDHEADER $r->print(''); $r->print(''); } - if ($env{'user.adv'}) { - $r->print( - '
'); - } - my (%roletext,%sortrole,%roleclass); my $countactive=0; my $countfuture=0; @@ -674,6 +667,18 @@ ENDHEADER } } } + if ($env{'user.adv'}) { + $r->print( + '
'); + } else { + if ($countactive > 0) { + my $domdesc = &Apache::lonnet::domain($env{'user.domain'},'description'); + $r->print('

'.&mt('[_1]Visit the [_2]Course Catalog[_3] to view all [_4] LON-CAPA courses.','','','',$domdesc).'
'.&mt('If a course is [_1]not[_2] in your list of current courses below, you may be able to enroll if self-enrollment is permitted.','','').'

'); + } + } + # No active roles if ($countactive==0) { if ($inrole) { @@ -786,9 +791,12 @@ ENDHEADER } $r->print(&Apache::lonnet::getannounce()); if ($advanced) { - $r->print('

This is LON-CAPA '. - $r->dir_config('lonVersion').'
'. - ''.&mt('Logout').'

'); + $r->print('

' + .&mt('This is LON-CAPA [_1]',$r->dir_config('lonVersion')) + .'
' + .''.&mt('Logout').'  ' + .''.&mt('Course Catalog') + .'

'); } $r->print(&Apache::loncommon::end_page()); return OK; @@ -858,7 +866,7 @@ sub print_rolerows { sub findcourse_advice { my ($r) = @_; my $domdesc = &Apache::lonnet::domain($env{'user.domain'},'description'); - if (&check_autoenroll($env{'user.domain'})) { + if (&Apache::lonnet::auto_run(undef,$env{'user.domain'})) { $r->print(&mt('If you were expecting to see an active role listed for a particular course in the [_1] domain, it may be missing for one of the following reasons:',$domdesc).'