--- loncom/interface/lonuserutils.pm 2009/12/20 01:53:42 1.109.2.1 +++ loncom/interface/lonuserutils.pm 2010/01/05 22:08:48 1.109.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA user accounts # -# $Id: lonuserutils.pm,v 1.109.2.1 2009/12/20 01:53:42 raeburn Exp $ +# $Id: lonuserutils.pm,v 1.109.2.2 2010/01/05 22:08:48 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1185,8 +1185,10 @@ sub default_role_selector { 'exs' => "Existing sections", 'new' => "New section", ); - $options = ''."\n"; + unless (($context eq 'course') && (&Apache::loncommon::needs_gci_custom())) { + $options .= ' '."\n"; + } if ($context eq 'course') { $options .= &default_course_roles($context,$checkpriv,$crstype,%customroles); } elsif ($context eq 'author') { @@ -5023,14 +5025,22 @@ sub roles_by_context { if ($env{'request.role'} =~ m{^dc\./}) { push(@allroles,'ad'); } - push(@allroles,('ta','ep','in')); - if ($crstype eq 'Community') { - push(@allroles,'co'); + if (&Apache::loncommon::needs_gci_custom()) { + if ($crstype eq 'Community') { + push(@allroles,'co'); + } else { + push(@allroles,'cc'); + } } else { - push(@allroles,'cc'); - } - if ($custom) { - push(@allroles,'cr'); + push(@allroles,('ta','ep','in')); + if ($crstype eq 'Community') { + push(@allroles,'co'); + } else { + push(@allroles,'cc'); + } + if ($custom) { + push(@allroles,'cr'); + } } } elsif ($context eq 'author') { @allroles = ('ca','aa');