[LON-CAPA-cvs] cvs: loncom /interface courseprefs.pm
raeburn
raeburn@source.lon-capa.org
Sun, 21 Feb 2010 16:02:09 -0000
raeburn Sun Feb 21 16:02:09 2010 EDT
Modified files:
/loncom/interface courseprefs.pm
Log:
- Display course owner information (not editable by CC).
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.23 loncom/interface/courseprefs.pm:1.24
--- loncom/interface/courseprefs.pm:1.23 Sun Feb 21 00:47:02 2010
+++ loncom/interface/courseprefs.pm Sun Feb 21 16:02:09 2010
@@ -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 @@
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',
@@ -340,10 +342,11 @@
'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 @@
input => 'textbox',
size => '25',
},
+ 'owner' => {
+ text => '<b>'.&mt($itemtext->{'owner'}).'</b>',
+ },
'courseid' => {
text => '<b>'.&mt($itemtext->{'courseid'}).'</b><br />'.'('.
&mt('internal, optional').')',
@@ -1523,7 +1529,7 @@
},
'cloners' => {
text => '<b>'.&mt($itemtext->{'cloners'}).'</b><br />'.
- &mt('Coordinators included automatically'),
+ &mt('Owner and Coordinators included automatically'),
input => 'textbox',
size => '40',
advanced => 1
@@ -1679,6 +1685,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});
}