--- loncom/lond 2009/10/19 23:16:36 1.429 +++ loncom/lond 2009/10/29 03:23:52 1.432 @@ -2,7 +2,7 @@ # The LearningOnline Network # lond "LON Daemon" Server (port "LOND" 5663) # -# $Id: lond,v 1.429 2009/10/19 23:16:36 raeburn Exp $ +# $Id: lond,v 1.432 2009/10/29 03:23:52 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.429 $'; #' stupid emacs +my $VERSION='$Revision: 1.432 $'; #' stupid emacs my $remoteVERSION; my $currenthostid="default"; my $currentdomainid; @@ -67,6 +67,7 @@ my $currentdomainid; my $client; my $clientip; # IP address of client. my $clientname; # LonCAPA name of client. +my $clientversion; # LonCAPA version running on client my $server; @@ -3121,6 +3122,13 @@ sub dump_with_regexp { my $qresult=''; my $count=0; while (my ($key,$value) = each(%$hashref)) { + if ($namespace eq 'roles') { + if ($key =~ /^($LONCAPA::match_domain)_($LONCAPA::match_community)_cc$/) { + if ($clientversion =~ /^(\d+\.\d+)$/) { + next if ($1 <= 2.9); + } + } + } if ($regexp eq '.') { $count++; if (defined($range) && $count >= $end) { last; } @@ -3784,17 +3792,17 @@ sub dump_course_id_handler { $cc_clone{$clonedom.'_'.$clonenum} = 1; } } - if (defined($createdbefore)) { + if ($createdbefore ne '') { $createdbefore = &unescape($createdbefore); } else { $createdbefore = 0; } - if (defined($createdafter)) { + if ($createdafter ne '') { $createdafter = &unescape($createdafter); } else { $createdafter = 0; } - if (defined($creationcontext)) { + if ($creationcontext ne '') { $creationcontext = &unescape($creationcontext); } else { $creationcontext = '.'; @@ -3827,7 +3835,7 @@ sub dump_course_id_handler { my $items = &Apache::lonnet::thaw_unescape($value); if (ref($items) eq 'HASH') { if ($hashref->{$lasttime_key} eq '') { - next if ($since > 0); + next if ($since > 1); } $is_hash = 1; if (defined($clonerudom)) { @@ -6263,7 +6271,7 @@ sub make_new_child { &ReadManagerTable(); my $clientrec=defined(&Apache::lonnet::get_hosts_from_ip($outsideip)); my $ismanager=($managers{$outsideip} ne undef); - $clientname = "[unknonwn]"; + $clientname = "[unknown]"; if($clientrec) { # Establish client type. $ConnectionType = "client"; $clientname = (&Apache::lonnet::get_hosts_from_ip($outsideip))[-1]; @@ -6291,7 +6299,7 @@ sub make_new_child { # # If the remote is attempting a local init... give that a try: # - my ($i, $inittype) = split(/:/, $remotereq); + (my $i, my $inittype, $clientversion) = split(/:/, $remotereq); # If the connection type is ssl, but I didn't get my # certificate files yet, then I'll drop back to @@ -6311,6 +6319,7 @@ sub make_new_child { } if($inittype eq "local") { + $clientversion = $perlvar{'lonVersion'}; my $key = LocalConnection($client, $remotereq); if($key) { Debug("Got local key $key");