[LON-CAPA-cvs] cvs: loncom / lond
raeburn
lon-capa-cvs-allow@mail.lon-capa.org
Mon, 30 Jun 2008 03:59:23 -0000
raeburn Sun Jun 29 23:59:23 2008 EDT
Modified files:
/loncom lond
Log:
- A course can be categorized into multiple categories. When searching for
courses based on category, course will match if the category filter is
one of the categories assigned to teh course.
Index: loncom/lond
diff -u loncom/lond:1.405 loncom/lond:1.406
--- loncom/lond:1.405 Thu Jun 26 19:51:59 2008
+++ loncom/lond Sun Jun 29 23:59:23 2008
@@ -2,7 +2,7 @@
# The LearningOnline Network
# lond "LON Daemon" Server (port "LOND" 5663)
#
-# $Id: lond,v 1.405 2008/06/26 23:51:59 raeburn Exp $
+# $Id: lond,v 1.406 2008/06/30 03:59:23 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -59,7 +59,7 @@
my $status='';
my $lastlog='';
-my $VERSION='$Revision: 1.405 $'; #' stupid emacs
+my $VERSION='$Revision: 1.406 $'; #' stupid emacs
my $remoteVERSION;
my $currenthostid="default";
my $currentdomainid;
@@ -3721,7 +3721,10 @@
}
}
if ($catfilter ne '') {
- next if ($items->{'category'} ne $catfilter);
+ next if ($items->{'categories'} eq '');
+ my @categories = split('&',$items->{'categories'});
+ next if ((@categories == 0) ||
+ (!grep(/^\Q$catfilter\E$/,@categories)));
}
if ($caller eq 'coursecatalog') {
if ($items->{'hidefromcat'} eq 'yes') {