[LON-CAPA-cvs] cvs: loncom /interface courseprefs.pm
raeburn
raeburn at source.lon-capa.org
Mon Nov 25 15:11:42 EST 2013
raeburn Mon Nov 25 20:11:42 2013 EDT
Modified files:
/loncom/interface courseprefs.pm
Log:
- Display of "clonedfrom" in Course Configuration/Settings moved from "Other"
to "General course settings".
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.62 loncom/interface/courseprefs.pm:1.63
--- loncom/interface/courseprefs.pm:1.62 Sun Nov 24 16:00:53 2013
+++ loncom/interface/courseprefs.pm Mon Nov 25 20:11:41 2013
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set configuration settings for a course
#
-# $Id: courseprefs.pm,v 1.62 2013/11/24 16:00:53 raeburn Exp $
+# $Id: courseprefs.pm,v 1.63 2013/11/25 20:11:41 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -357,7 +357,7 @@
{ text => $lt{'gens'},
help => 'Course_Prefs_General',
ordered => ['owner','co-owners','loncaparev','description',
- 'courseid','categories','hidefromcat',
+ 'clonedfrom','courseid','categories','hidefromcat',
'externalsyllabus','cloners','url','rolenames'],
itemtext => {
'owner' => $lt{'ownr'},
@@ -371,6 +371,7 @@
'url' => 'Top Level Map',
'rolenames' => $lt{'rept'},
'loncaparev' => $lt{'lcrv'},
+ 'clonedfrom' => 'Cloned from',
},
},
'localization' =>
@@ -705,7 +706,8 @@
next if (($entry eq 'categories') &&
(!$can_categorize));
next if (($entry eq 'loncaparev') ||
- ($entry eq 'owner'));
+ ($entry eq 'owner') ||
+ ($entry eq 'clonedfrom'));
push(@ordered,$entry);
}
} elsif ($action eq 'classlists') {
@@ -1852,6 +1854,9 @@
'co-owners' => {
text => '<b>'.&mt($itemtext->{'co-owners'}).'</b>',
},
+ 'clonedfrom' => {
+ text => '<b>'.&mt($itemtext->{'clonedfrom'}).'</b>',
+ },
'courseid' => {
text => '<b>'.&mt($itemtext->{'courseid'}).'</b><br />'.'('.
&mt('internal, optional').')',
@@ -2038,6 +2043,16 @@
$owner = &mt('None specified');
}
$datatable .= $owner;
+ } elsif ($item eq 'clonedfrom') {
+ my $clonesrc = $env{'course.'.$env{'request.course.id'}.'.clonedfrom'};
+ my $clonedfrom = &mt('None');
+ if ($clonesrc =~ m{/$match_domain/$match_courseid}) {
+ my %clonesrcinfo = &Apache::lonnet::coursedescription($cdom.'/'.$cnum);
+ if ($clonesrcinfo{'description'}) {
+ $clonedfrom = $clonesrcinfo{'description'}.' '.($clonesrc);
+ }
+ }
+ $datatable .= $clonedfrom;
} elsif ($item eq 'co-owners') {
my $coowners = $env{'course.'.$env{'request.course.id'}.'.internal.co-owners'};
my @currcoown;
@@ -3755,7 +3770,8 @@
|| ($parameter eq 'type') ||
($parameter =~ m/^(cc|co|in|ta|ep|ad|st)\.plaintext$/)
|| ($parameter =~ m/^discussion_post_fonts/) ||
- ($parameter =~ m{^(minimal|updated|uploaded|external)syllabus$})) {
+ ($parameter =~ m{^(minimal|updated|uploaded|external)syllabus$}) ||
+ ($parameter eq 'clonedfrom')) {
push(@ordered,$parameter);
}
}
More information about the LON-CAPA-cvs
mailing list