--- loncom/interface/courseprefs.pm 2010/02/21 00:47:02 1.23
+++ loncom/interface/courseprefs.pm 2010/02/21 16:02:09 1.24
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set configuration settings for a course
#
-# $Id: courseprefs.pm,v 1.23 2010/02/21 00:47:02 raeburn Exp $
+# $Id: courseprefs.pm,v 1.24 2010/02/21 16:02:09 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -272,6 +272,7 @@ sub handler {
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 @@ sub handler {
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',
@@ -340,10 +342,11 @@ sub handler {
'courseinfo' =>
{ text => $lt{'gens'},
help => 'Course_Environment',
- ordered => ['description','courseid','categories',
+ ordered => ['owner','description','courseid','categories',
'hidefromcat','externalsyllabus',
'cloners','url','rolenames'],
itemtext => {
+ owner => $lt{'ownr'},
description => $lt{'desc'},
courseid => $lt{'idnu'},
categories => $lt{'catg'},
@@ -1515,6 +1518,9 @@ sub print_courseinfo {
input => 'textbox',
size => '25',
},
+ 'owner' => {
+ text => ''.&mt($itemtext->{'owner'}).'',
+ },
'courseid' => {
text => ''.&mt($itemtext->{'courseid'}).'
'.'('.
&mt('internal, optional').')',
@@ -1523,7 +1529,7 @@ sub print_courseinfo {
},
'cloners' => {
text => ''.&mt($itemtext->{'cloners'}).'
'.
- &mt('Coordinators included automatically'),
+ &mt('Owner and Coordinators included automatically'),
input => 'textbox',
size => '40',
advanced => 1
@@ -1679,6 +1685,18 @@ sub print_courseinfo {
$datatable .= ''.
&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});
}