--- loncom/auth/lonroles.pm 2012/02/08 16:27:35 1.256.2.6.2.2 +++ loncom/auth/lonroles.pm 2012/02/09 01:11:52 1.256.2.6.2.3 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.256.2.6.2.2 2012/02/08 16:27:35 raeburn Exp $ +# $Id: lonroles.pm,v 1.256.2.6.2.3 2012/02/09 01:11:52 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -878,6 +878,27 @@ ENDHEADER } $r->print(&Apache::loncommon::end_page()); return OK; + } elsif ($countactive==1 && $countfuture==0) { # Only one choice + my $needs_switchserver; + if ($env{'user.author'}) { + $needs_switchserver = &check_needs_switchserver($possiblerole); + } + if ((!$needs_switchserver) && ($env{'request.role'} eq 'cm')) { + $r->print('