--- loncom/lond 2008/04/21 15:27:34 1.400 +++ loncom/lond 2008/05/30 21:33:21 1.403 @@ -2,7 +2,7 @@ # The LearningOnline Network # lond "LON Daemon" Server (port "LOND" 5663) # -# $Id: lond,v 1.400 2008/04/21 15:27:34 raeburn Exp $ +# $Id: lond,v 1.403 2008/05/30 21:33:21 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -59,7 +59,7 @@ my $DEBUG = 0; # Non zero to ena my $status=''; my $lastlog=''; -my $VERSION='$Revision: 1.400 $'; #' stupid emacs +my $VERSION='$Revision: 1.403 $'; #' stupid emacs my $remoteVERSION; my $currenthostid="default"; my $currentdomainid; @@ -3626,7 +3626,7 @@ sub dump_course_id_handler { my $userinput = "$cmd:$tail"; my ($udom,$since,$description,$instcodefilter,$ownerfilter,$coursefilter, - $typefilter,$regexp_ok,$rtn_as_hash,$selfenrollonly) =split(/:/,$tail); + $typefilter,$regexp_ok,$rtn_as_hash,$selfenrollonly,$catfilter) =split(/:/,$tail); my $now = time; if (defined($description)) { $description=&unescape($description); @@ -3667,6 +3667,9 @@ sub dump_course_id_handler { if (defined($regexp_ok)) { $regexp_ok=&unescape($regexp_ok); } + if (defined($catfilter)) { + $catfilter=&unescape($catfilter); + } my $unpack = 1; if ($description eq '.' && $instcodefilter eq '.' && $coursefilter eq '.' && $typefilter eq '.') { @@ -3705,12 +3708,19 @@ sub dump_course_id_handler { next; } } + if ($catfilter ne '') { + next if ($items->{'category'} ne $catfilter); + } } } else { + next if ($catfilter ne ''); + next if ($selfenrollonly); $is_hash = 0; my @courseitems = split(/:/,$value); $lasttime = pop(@courseitems); - next if ($lasttime<$since); + if ($hashref->{$lasttime_key} eq '') { + next if ($lasttime<$since); + } ($val{'descr'},$val{'inst_code'},$val{'owner'},$val{'type'}) = @courseitems; } my $match = 1;