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

raeburn raeburn@source.lon-capa.org
Mon, 22 Feb 2010 15:59:29 -0000


raeburn		Mon Feb 22 15:59:29 2010 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/interface	courseprefs.pm 
  Log:
  - Backport 1.24.
  
  
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.8.2.7 loncom/interface/courseprefs.pm:1.8.2.8
--- loncom/interface/courseprefs.pm:1.8.2.7	Sun Feb 21 01:06:13 2010
+++ loncom/interface/courseprefs.pm	Mon Feb 22 15:59:28 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set configuration settings for a course
 #
-# $Id: courseprefs.pm,v 1.8.2.7 2010/02/21 01:06:13 raeburn Exp $
+# $Id: courseprefs.pm,v 1.8.2.8 2010/02/22 15:59:28 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -272,6 +272,7 @@
                 gens => 'General community settings',
                 idnu => 'Community ID or number',
                 desc => 'Community Description',
+                ownr => 'Community Owner',
                 catg => 'Categorize community',
                 excc => 'Exclude from community catalog',
                 clon => 'Users allowed to clone community',
@@ -297,6 +298,7 @@
                 gens => 'General course settings',
                 idnu => 'Course ID or number',
                 desc => 'Course Description',
+                ownr => 'Course Owner',
                 catg => 'Categorize course',
                 excc => 'Exclude from course catalog',
                 clon => 'Users allowed to clone course',
@@ -342,10 +344,11 @@
                      help => 'Course_Environment',
                      header => [{col1 => 'Setting',
                                  col2 => 'Value'}],
-                     ordered => ['description','courseid','categories',
+                     ordered => ['owner','description','courseid','categories',
                                  'hidefromcat','cloners','externalsyllabus',
                                  'url','rolenames'],
                      itemtext => {
+                                   owner            => $lt{'ownr'},
                                    description      => $lt{'desc'},
                                    courseid         => $lt{'idnu'},
                                    categories       => $lt{'catg'},
@@ -1530,6 +1533,9 @@
                    input => 'textbox',
                    size  => '25',
                           },
+        'owner'        => {
+                   text => '<b>'.&mt($itemtext->{'owner'}).'</b>',
+                          },
         'courseid'     => { 
                    text => '<b>'.&mt($itemtext->{'courseid'}).'</b><br />'.'('.
                            &mt('internal, optional').')',
@@ -1538,7 +1544,7 @@
                           },
         'cloners'      => { 
                    text => '<b>'.&mt($itemtext->{'cloners'}).'</b><br />'.
-                           &mt('Coordinators included automatically'),
+                           &mt('Owner and Coordinators included automatically'),
                    input => 'textbox',
                    size  => '40',
                          },
@@ -1689,6 +1695,18 @@
             $datatable .= '<input type="hidden" name="categories" value="'.$settings->{$item}.'" />'.
                           &Apache::lonhtmlcommon::textbox($item.'_display',$settings->{$item},
                                                           $items{$item}{size},$launcher);
+        } elsif ($item eq 'owner') {
+            my $owner = $env{'course.'.$env{'request.course.id'}.'.internal.courseowner'};
+            if ($owner =~ /:/) {
+                my ($ownername,$ownerdom) = split(':',$owner);
+                $owner = &Apache::loncommon::plainname($ownername,$ownerdom);
+            } elsif ($owner ne '') {
+                $owner = &Apache::loncommon::plainname($owner,$cdom);
+            } else {
+                $owner = &mt('None specified');
+            }
+            my $domdesc = &Apache::lonnet::domain($cdom,'description');
+            $datatable .= $owner;
         } else {
             $datatable .= &Apache::lonhtmlcommon::textbox($item,$settings->{$item},$items{$item}{size});
         }