[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /interface loncreateuser.pm

raeburn raeburn@source.lon-capa.org
Wed, 20 Jan 2010 14:59:27 -0000


raeburn		Wed Jan 20 14:59:27 2010 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/interface	loncreateuser.pm 
  Log:
  - Backport 1.299.
  
  
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.295.2.28 loncom/interface/loncreateuser.pm:1.295.2.29
--- loncom/interface/loncreateuser.pm:1.295.2.28	Wed Jan 20 14:35:36 2010
+++ loncom/interface/loncreateuser.pm	Wed Jan 20 14:59:27 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.295.2.28 2010/01/20 14:35:36 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.295.2.29 2010/01/20 14:59:27 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -231,11 +231,13 @@
                    'uscu'       => "Use custom",
                    'official'   => 'Can request creation of official courses',
                    'unofficial' => 'Can request creation of unofficial courses',
+                   'community'  => 'Can request creation of communities',
     );
     if ($context eq 'requestcourses') {
         %userenv = &Apache::lonnet::userenvironment($ccdomain,$ccuname,
-                      'requestcourses.official','requestcourses.unofficial');
-        @usertools = ('official','unofficial');
+                      'requestcourses.official','requestcourses.unofficial',
+                      'requestcourses.community');
+        @usertools = ('official','unofficial','community');
         @options =('norequest','approval','autolimit','validate');
         %validations = &Apache::lonnet::auto_courserequest_checks($ccdomain);
         %reqtitles = &courserequest_titles();
@@ -2684,7 +2686,8 @@
                         ($env{'user.domain'} eq $env{'form.ccdomain'})) {
                         my %newenvhash;
                         foreach my $key (keys(%changed)) {
-                            if (($key eq 'official') || ($key eq 'unofficial')) {
+                            if (($key eq 'official') || ($key eq 'unofficial')
+                                || ($key eq 'community')) {
                                 $newenvhash{'environment.requestcourses.'.$key} =
                                     $changeHash{'requestcourses.'.$key};
                                 if ($changeHash{'requestcourses.'.$key} ne '') {
@@ -2745,6 +2748,7 @@
                              'portfolio'  => 'Portfolio Availability',
                              'official'   => 'Can Request Official Courses',
                              'unofficial' => 'Can Request Unofficial Courses',
+                             'community'  => 'Can Request Communities',
                              'inststatus' => "Affiliation",
                              'prvs'       => 'Previous Value:',
                              'chto'       => 'Changed To:'
@@ -2898,6 +2902,7 @@
                            'portfolio'  => "Portfolio Availability",
                            'official'   => "Can Request Official Courses",
                            'unofficial' => "Can Request Unofficial Courses",
+                           'community'  => "Can Request Communities",
                            'inststatus' => "Affiliation",
 					       );
             $r->print(<<"END");