[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface courseprefs.pm
raeburn
raeburn at source.lon-capa.org
Fri Dec 27 10:06:40 EST 2013
raeburn Fri Dec 27 15:06:40 2013 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface courseprefs.pm
Log:
- For 2.11
- Backport 1.64
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.49.2.11 loncom/interface/courseprefs.pm:1.49.2.12
--- loncom/interface/courseprefs.pm:1.49.2.11 Fri Dec 13 13:57:22 2013
+++ loncom/interface/courseprefs.pm Fri Dec 27 15:06:40 2013
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set configuration settings for a course
#
-# $Id: courseprefs.pm,v 1.49.2.11 2013/12/13 13:57:22 raeburn Exp $
+# $Id: courseprefs.pm,v 1.49.2.12 2013/12/27 15:06:40 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -272,6 +272,7 @@
edit => 'Edit Community Settings',
gens => 'General community settings',
idnu => 'Community ID or number',
+ unco => 'Unique code',
desc => 'Community Description',
ownr => 'Community Owner',
cown => 'Community Co-owners',
@@ -299,6 +300,7 @@
edit => 'Edit Course Settings',
gens => 'General course settings',
idnu => 'Course ID or number',
+ unco => 'Unique code',
desc => 'Course Description',
cred => 'Student credits',
ownr => 'Course Owner',
@@ -357,13 +359,15 @@
{ text => $lt{'gens'},
help => 'Course_Prefs_General',
ordered => ['owner','co-owners','loncaparev','description',
- 'clonedfrom','courseid','categories','hidefromcat',
- 'externalsyllabus','cloners','url','rolenames'],
+ 'clonedfrom','courseid','uniquecode','categories',
+ 'hidefromcat','externalsyllabus','cloners','url',
+ 'rolenames'],
itemtext => {
'owner' => $lt{'ownr'},
'co-owners' => $lt{'cown'},
'description' => $lt{'desc'},
'courseid' => $lt{'idnu'},
+ 'uniquecode' => $lt{'unco'},
'categories' => $lt{'catg'},
'hidefromcat' => $lt{'excc'},
'cloners' => $lt{'clon'},
@@ -1863,6 +1867,9 @@
input => 'textbox',
size => '25',
},
+ 'uniquecode' => {
+ text => '<b>'.&mt($itemtext->{'uniquecode'}).'</b>',
+ },
'cloners' => {
text => '<b>'.&mt($itemtext->{'cloners'}).'</b><br />'.
&mt('Owner and Coordinators included automatically'),
@@ -1908,6 +1915,8 @@
next if (!$can_toggle_cat);
} elsif ($item eq 'categories') {
next if (!$can_categorize);
+ } elsif ($item eq 'uniquecode') {
+ next if (!$env{'course.'.$env{'request.course.id'}.'.internal.uniquecode'});
}
unless (($item eq 'cloners') || ($item eq 'rolenames')) {
$colspan = 2;
@@ -2053,6 +2062,11 @@
}
}
$datatable .= $clonedfrom;
+ } elsif ($item eq 'uniquecode') {
+ my $code = $env{'course.'.$env{'request.course.id'}.'.internal.uniquecode'};
+ if ($code) {
+ $datatable .= $code;
+ }
} elsif ($item eq 'co-owners') {
my $coowners = $env{'course.'.$env{'request.course.id'}.'.internal.co-owners'};
my @currcoown;
More information about the LON-CAPA-cvs
mailing list