[LON-CAPA-cvs] cvs: loncom /interface lonrequestcourse.pm
raeburn
raeburn at source.lon-capa.org
Tue Sep 1 10:11:26 EDT 2015
raeburn Tue Sep 1 14:11:26 2015 EDT
Modified files:
/loncom/interface lonrequestcourse.pm
Log:
- Display owner and co-owners in colleagues' courses table in course request
form.
Index: loncom/interface/lonrequestcourse.pm
diff -u loncom/interface/lonrequestcourse.pm:1.93 loncom/interface/lonrequestcourse.pm:1.94
--- loncom/interface/lonrequestcourse.pm:1.93 Mon Aug 24 14:50:22 2015
+++ loncom/interface/lonrequestcourse.pm Tue Sep 1 14:11:26 2015
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Request a course
#
-# $Id: lonrequestcourse.pm,v 1.93 2015/08/24 14:50:22 raeburn Exp $
+# $Id: lonrequestcourse.pm,v 1.94 2015/09/01 14:11:26 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4849,12 +4849,22 @@
my $cleantitle=&HTML::Entities::encode($title,'<>&"');
$cleantitle=~s/'/\\'/g;
$cleantitle =~ s/^\s+//;
- my ($namestr, at owners,%ownernames);
- my $singleowner = $cloneableref->{$cid}{'internal.courseowner'};
- push(@owners,$singleowner);
- if ($cloneableref->{$cid}{'co-owners'} ne '') {
- foreach my $item (split(/,/,$cloneableref->{$cid}{'internal.co-owners'})) {
- push(@owners,$item);
+ my ($namestr,$singleowner,$otherowners, at owners,%ownernames);
+ if ($name eq 'colleague') {
+ $singleowner = $cloneableref->{$cid}{'owner'};
+ $otherowners = $cloneableref->{$cid}{'co-owners'};
+ } else {
+ $singleowner = $cloneableref->{$cid}{'internal.courseowner'};
+ $otherowners = $cloneableref->{$cid}{'internal.co-owners'};
+ }
+ if ($singleowner ne '') {
+ push(@owners,$singleowner);
+ }
+ if ($otherowners ne '') {
+ foreach my $item (split(/,/,$otherowners)) {
+ if (($item ne '') && (!grep(/^\Q$item\E$/, at owners))) {
+ push(@owners,$item);
+ }
}
}
foreach my $owner (@owners) {
More information about the LON-CAPA-cvs
mailing list