[LON-CAPA-cvs] cvs: loncom /interface domainprefs.pm loncommon.pm loncreateuser.pm /lonnet/perl lonnet.pm

raeburn raeburn@source.lon-capa.org
Sat, 25 Jul 2009 14:44:55 -0000


This is a MIME encoded message

--raeburn1248533095
Content-Type: text/plain

raeburn		Sat Jul 25 14:44:55 2009 EDT

  Modified files:              
    /loncom/interface	domainprefs.pm loncommon.pm loncreateuser.pm 
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Additional course type which can be requested - "community".
    - This is to facilitate collaborative activities for non-instructional purposes,
       e.g., in a campus organization. Some other LMSs use the term "Group".
  
  
--raeburn1248533095
Content-Type: text/plain
Content-Disposition: attachment; filename="raeburn-20090725144455.txt"

Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.97 loncom/interface/domainprefs.pm:1.98
--- loncom/interface/domainprefs.pm:1.97	Tue May 26 20:39:22 2009
+++ loncom/interface/domainprefs.pm	Sat Jul 25 14:44:50 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: domainprefs.pm,v 1.97 2009/05/26 20:39:22 tempelho Exp $
+# $Id: domainprefs.pm,v 1.98 2009/07/25 14:44:50 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1019,7 +1019,7 @@
     my $typecount = 0;
     my $css_class;
     if ($context eq 'requestcourses') {
-        @usertools = ('official','unofficial');
+        @usertools = ('official','unofficial','community');
     } else {
         @usertools = ('aboutme','blog','portfolio');
     }
@@ -1117,7 +1117,9 @@
     $typecount ++;
     $css_class = $typecount%2?' class="LC_odd_row"':'';
     $datatable .= '<tr'.$css_class.'>'.
-                  '<td><br/>'.&mt('LON-CAPA Advanced Users').'</td>'.
+                  '<td>'.&mt('LON-CAPA Advanced Users').
+                  ' <span class="LC_nobreak">('.
+                  &mt('overrides affiliation').')</span></td>'.
                   '<td class="LC_left_item" colspan="2"><br />';
     foreach my $item (@usertools) {
         my $checked;
@@ -1138,8 +1140,7 @@
                       '" value="_LC_adv" '.$checked.'/>'.$titles{$item}.
                       '</label></span>&nbsp; ';
     }
-    $datatable .= '<span class="LC_nobreak">('.&mt('overrides affiliation').
-                  ')</span></td></tr>';
+    $datatable .= '</td></tr>';
     $$rowtotal += $typecount;
     return $datatable;
 }
@@ -1471,6 +1472,7 @@
                      portfolio  => 'Portfolio',
                      official   => 'Official courses (with institutional codes)',
                      unofficial => 'Unofficial courses',
+                     community  => 'Communities',
                  );
     return %titles;
 }
@@ -3348,7 +3350,7 @@
         $context = $action;
     }
     if ($context eq 'requestcourses') {
-        @usertools = ('official','unofficial');
+        @usertools = ('official','unofficial','community');
     } else {
         @usertools = ('aboutme','blog','portfolio');
     }
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.863 loncom/interface/loncommon.pm:1.864
--- loncom/interface/loncommon.pm:1.863	Tue Jul 21 14:36:07 2009
+++ loncom/interface/loncommon.pm	Sat Jul 25 14:44:50 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.863 2009/07/21 14:36:07 droeschl Exp $
+# $Id: loncommon.pm,v 1.864 2009/07/25 14:44:50 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -10404,7 +10404,7 @@
                 &Apache::lonnet::usertools_access($username,$domain,$tool,'reload');
         }
 
-        foreach my $crstype ('official','unofficial') {
+        foreach my $crstype ('official','unofficial','community') {
             $userenv{'canrequest.'.$crstype} =
                 &Apache::lonnet::usertools_access($username,$domain,$crstype,
                                                   'reload','requestcourses');
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.298 loncom/interface/loncreateuser.pm:1.299
--- loncom/interface/loncreateuser.pm:1.298	Fri Jul 17 22:24:08 2009
+++ loncom/interface/loncreateuser.pm	Sat Jul 25 14:44:50 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.298 2009/07/17 22:24:08 droeschl Exp $
+# $Id: loncreateuser.pm,v 1.299 2009/07/25 14:44:50 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -225,12 +225,14 @@
                    'usde'       => "Use default",
                    'uscu'       => "Use custom",
                    'official'   => 'Can request creation of official courses',
-                   'unofficial' => 'Can request creation of unofficial 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');
     } else {
         %userenv = &Apache::lonnet::userenvironment($ccdomain,$ccuname,
                           'tools.aboutme','tools.portfolio','tools.blog');
@@ -1861,7 +1863,7 @@
 			 $env{'form.ccuname'}, $env{'form.ccdomain'}).'</h3>');
     my (%alerts,%rulematch,%inst_results,%curr_rules);
     my @usertools = ('aboutme','blog','portfolio');
-    my @requestcourses = ('official','unofficial');
+    my @requestcourses = ('official','unofficial','community');
     my ($othertitle,$usertypes,$types) = 
         &Apache::loncommon::sorted_inst_types($env{'form.ccdomain'});
     if ($env{'form.makeuser'}) {
@@ -1998,7 +2000,7 @@
             ('environment',['firstname','middlename','lastname','generation',
              'id','permanentemail','portfolioquota','inststatus','tools.aboutme',
              'tools.blog','tools.portfolio','requestcourses.official',
-             'requestcourses.unofficial'],
+             'requestcourses.unofficial','requestcourses.community'],
               $env{'form.ccdomain'},$env{'form.ccuname'});
         my ($tmp) = keys(%userenv);
         if ($tmp =~ /^(con_lost|error)/i) { 
@@ -2246,7 +2248,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 '') {
@@ -2308,6 +2311,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:'
@@ -2445,7 +2449,8 @@
                            'aboutme'    => "Personal Information Page Availability",
                            'portfolio'  => "Portfolio Availability",
                            'official'   => "Can Request Official Courses",
-                           'unofficial' => "Can Request Unofficial Course",
+                           'unofficial' => "Can Request Unofficial Courses",
+                           'community'  => "Can Request Communities",
                            'inststatus' => "Affiliation",
 					       );
             $r->print(<<"END");
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1005 loncom/lonnet/perl/lonnet.pm:1.1006
--- loncom/lonnet/perl/lonnet.pm:1.1005	Mon Jul 20 23:33:11 2009
+++ loncom/lonnet/perl/lonnet.pm	Sat Jul 25 14:44:55 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1005 2009/07/20 23:33:11 raeburn Exp $
+# $Id: lonnet.pm,v 1.1006 2009/07/25 14:44:55 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1326,7 +1326,7 @@
         }
     }
     if (ref($domconfig{'requestcourses'}) eq 'HASH') {
-        foreach my $item ('official','unofficial') {
+        foreach my $item ('official','unofficial','community') {
             $domdefaults{$item} = $domconfig{'requestcourses'}{$item};
         }
     }
@@ -4635,6 +4635,7 @@
         %tools = (
                       official   => 1,
                       unofficial => 1,
+                      community  => 1,
                  );
     } else {
         %tools = (

--raeburn1248533095--