--- loncom/interface/loncoursegroups.pm 2005/10/27 23:32:27 1.1 +++ loncom/interface/loncoursegroups.pm 2005/10/27 23:42:17 1.2 @@ -104,7 +104,6 @@ ENDHEAD sub print_main_menu { my ($r,$manage_permission,$view_permission)=@_; - my ($cdom,$cnum) = split/_/,$env{'request.course.id'}; my @menu = ( { text => 'Create a new group', @@ -161,6 +160,8 @@ ENDFOOT sub first_creation_form { my ($r) = @_; + my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; + my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; my %lt = &Apache::lonlocal::texthash( 'gmem' => 'Group membership options', 'picr' => 'Pick the criteria to use to build a list of course users from which you will select members of the new group', @@ -184,7 +185,8 @@ sub first_creation_form { my @sections = (); my $section_sel = ''; my $numvisible; - my $numsections = &Apache::loncommon::get_sections($env{'course.'.$env{'request.course.id'}.'.domain'},$env{'course.'.$env{'request.course.id'}.'.num'},\%sectioncount); + my $numsections = &Apache::loncommon::get_sections($cdom,$cnum, + \%sectioncount); @sections = sort {$a cmp $b} keys(%sectioncount); unshift(@sections,'all'); # Put 'all' at the front of the list