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

raeburn raeburn@source.lon-capa.org
Tue, 25 Jan 2011 02:49:42 -0000


raeburn		Tue Jan 25 02:49:42 2011 EDT

  Modified files:              
    /loncom/interface	coursecatalog.pm lonpickcourse.pm 
  Log:
  - Eventual implementation of storage of co-owners in nohist_courseids.db 
    (LON-CAPA 2.9.0) was to store as comma separated list, not as anonymous array. 
  
  
Index: loncom/interface/coursecatalog.pm
diff -u loncom/interface/coursecatalog.pm:1.66 loncom/interface/coursecatalog.pm:1.67
--- loncom/interface/coursecatalog.pm:1.66	Mon Dec 20 22:56:56 2010
+++ loncom/interface/coursecatalog.pm	Tue Jan 25 02:49:42 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler for displaying the course catalog interface
 #
-# $Id: coursecatalog.pm,v 1.66 2010/12/20 22:56:56 raeburn Exp $
+# $Id: coursecatalog.pm,v 1.67 2011/01/25 02:49:42 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -799,8 +799,8 @@
             $selfenroll_end = $courses->{$course}{'selfenroll_end_date'};
             $categories = $courses->{$course}{'categories'};
             push(@owners,$singleowner);
-            if (ref($courses->{$course}{'co-owners'}) eq 'ARRAY') {
-                foreach my $item (@{$courses->{$course}{'co-owners'}}) {
+            if ($courses->{$course}{'co-owners'} ne '') {
+                foreach my $item (split(/,/,$courses->{$course}{'co-owners'})) {
                     push(@owners,$item);
                 }
             }
Index: loncom/interface/lonpickcourse.pm
diff -u loncom/interface/lonpickcourse.pm:1.100 loncom/interface/lonpickcourse.pm:1.101
--- loncom/interface/lonpickcourse.pm:1.100	Thu Sep 23 21:50:37 2010
+++ loncom/interface/lonpickcourse.pm	Tue Jan 25 02:49:42 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Pick a course
 #
-# $Id: lonpickcourse.pm,v 1.100 2010/09/23 21:50:37 www Exp $
+# $Id: lonpickcourse.pm,v 1.101 2011/01/25 02:49:42 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -439,10 +439,10 @@
                         }
                     }
                 }
-                push(@owners,&unescape($courses{$course}{'owner'}));
-                if (ref($courses{$course}{'co-owners'}) eq 'ARRAY') {
-                    foreach my $item (@{$courses{$course}{'co-owners'}}) {
-                        push(@owners,&unescape($item));
+                push(@owners,$courses{$course}{'owner'});
+                if ($courses{$course}{'co-owners'} ne '') {
+                    foreach my $item (split(/,/,$courses{$course}{'co-owners'})) {
+                        push(@owners,$item);
                     }
                 }
             } else {