--- loncom/interface/loncreateuser.pm 2006/05/08 21:40:20 1.113 +++ loncom/interface/loncreateuser.pm 2006/05/09 14:38:10 1.114 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.113 2006/05/08 21:40:20 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.114 2006/05/09 14:38:10 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -302,17 +302,14 @@ sub print_user_modification_page { my $dc_setcourse_code = ''; my $nondc_setsection_code = ''; my %loaditem; - my (%curr_groups,$groupslist,$numgroups); - if (exists($env{'request.course.id'})) { - my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; - my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; - $numgroups = &Apache::loncommon::coursegroups(\%curr_groups,$cdom, - $cnum); - } - if ($numgroups > 0) { + + my $groupslist; + my %curr_groups = &Apache::loncommon::coursegroups(); + if (%curr_groups) { $groupslist = join('","',sort(keys(%curr_groups))); $groupslist = '"'.$groupslist.'"'; } + if ($env{'request.role'} =~ m-^dc\./(\w+)/$-) { my $dcdom = $1; $loaditem{'onload'} = "document.cu.coursedesc.value=''"; @@ -1209,7 +1206,6 @@ END } } ## - my %curr_groups; my $now=time; $r->print('