[LON-CAPA-cvs] cvs: loncom /interface loncoursegroups.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Thu, 27 Oct 2005 23:42:18 -0000


raeburn		Thu Oct 27 19:42:18 2005 EDT

  Modified files:              
    /loncom/interface	loncoursegroups.pm 
  Log:
  Some clean up.
  
  
Index: loncom/interface/loncoursegroups.pm
diff -u loncom/interface/loncoursegroups.pm:1.1 loncom/interface/loncoursegroups.pm:1.2
--- loncom/interface/loncoursegroups.pm:1.1	Thu Oct 27 19:32:27 2005
+++ loncom/interface/loncoursegroups.pm	Thu Oct 27 19:42:17 2005
@@ -104,7 +104,6 @@
 
 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 @@
 
 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 @@
     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