[LON-CAPA-cvs] cvs: loncom /interface lonrequestcourse.pm

raeburn raeburn at source.lon-capa.org
Tue Sep 1 12:40:20 EDT 2015


raeburn		Tue Sep  1 16:40:20 2015 EDT

  Modified files:              
    /loncom/interface	lonrequestcourse.pm 
  Log:
  - Display co-owners in own courses table in course request form.
  
  
Index: loncom/interface/lonrequestcourse.pm
diff -u loncom/interface/lonrequestcourse.pm:1.94 loncom/interface/lonrequestcourse.pm:1.95
--- loncom/interface/lonrequestcourse.pm:1.94	Tue Sep  1 14:11:26 2015
+++ loncom/interface/lonrequestcourse.pm	Tue Sep  1 16:40:20 2015
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Request a course
 #
-# $Id: lonrequestcourse.pm,v 1.94 2015/09/01 14:11:26 raeburn Exp $
+# $Id: lonrequestcourse.pm,v 1.95 2015/09/01 16:40:20 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4554,7 +4554,16 @@
         $cc_clone .= $cdom.':'.$cnum.'&';
         unless (exists($cloneable{$cdom.'_'.$cnum})) {
             my %courseinfo = &Apache::lonnet::coursedescription($cdom.'_'.$cnum,{'one_time' => 1});
-            $cloneable{$cdom.'_'.$cnum} = \%courseinfo;
+            $cloneable{$cdom.'_'.$cnum} = {
+                                               context => $courseinfo{'internal.creationcontext'},
+                                               created => $courseinfo{'internal.created'},
+                                               creator => $courseinfo{'internal.creator'},
+                                               description => $courseinfo{'description'},
+                                               inst_code => $courseinfo{'coursecode'},
+                                               owner => $courseinfo{'internal.courseowner'},
+                                               releaserequired => $courseinfo{'internal.releaserequired'},
+                                               type  => $courseinfo{'type'},
+                                           };
         }
     }
 
@@ -4849,19 +4858,12 @@
                 my $cleantitle=&HTML::Entities::encode($title,'<>&"');
                 $cleantitle=~s/'/\\'/g;
                 $cleantitle =~ s/^\s+//;
-                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);
+                my ($namestr, at owners,%ownernames);
+                if ($cloneableref->{$cid}{'owner'} ne '') {
+                    push(@owners,$cloneableref->{$cid}{'owner'});
                 }
-                if ($otherowners ne '') {
-                    foreach my $item (split(/,/,$otherowners)) {
+                if ($cloneableref->{$cid}{'co-owners'} ne '') {
+                    foreach my $item (split(/,/,$cloneableref->{$cid}{'co-owners'})) {
                         if (($item ne '') && (!grep(/^\Q$item\E$/, at owners))) {
                             push(@owners,$item);
                         }




More information about the LON-CAPA-cvs mailing list