[LON-CAPA-cvs] cvs: loncom / lond

taceyjo1 lon-capa-cvs@mail.lon-capa.org
Fri, 06 Feb 2004 05:25:16 -0000


taceyjo1		Fri Feb  6 00:25:16 2004 EDT

  Modified files:              
    /loncom	lond 
  Log:
  Ok, another little thing, on the way to make lond parse metadata and just be done with it, see bug #2706 for 1.2 implimentation idea
  
  
Index: loncom/lond
diff -u loncom/lond:1.173 loncom/lond:1.174
--- loncom/lond:1.173	Wed Feb  4 12:17:26 2004
+++ loncom/lond	Fri Feb  6 00:25:16 2004
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.173 2004/02/04 17:17:26 taceyjo1 Exp $
+# $Id: lond,v 1.174 2004/02/06 05:25:16 taceyjo1 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -53,7 +53,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.173 $'; #' stupid emacs
+my $VERSION='$Revision: 1.174 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid;
 my $currentdomainid;
@@ -2725,6 +2725,7 @@
 		} elsif ($userinput =~ /^ls/) {
 		    if(isClient) {
 			my $obs;
+			my $rights;
 			my ($cmd,$ulsdir)=split(/:/,$userinput);
 			my $ulsout='';
 			my $ulsfn;
@@ -2732,7 +2733,7 @@
 			    if(-d $ulsdir) {
 				if (opendir(LSDIR,$ulsdir)) {
 				    while ($ulsfn=readdir(LSDIR)) {
-					undef $obs; 
+					undef $obs, $rights; 
 					my @ulsstats=stat($ulsdir.'/'.$ulsfn);
 					#We do some obsolete checking here
 					if(-e $ulsdir.'/'.$ulsfn.".meta") { 
@@ -2740,10 +2741,13 @@
 					    my @obsolete=<FILE>;
 					    foreach my $obsolete (@obsolete) {
 					        if($obsolete =~ m|(<obsolete>)(on)|) { $obs = 1; } 
+						if($obsolete =~ m|(<copyright>)(default)|) { $rights = 1; }
 					    }
 					}
 					$ulsout.=$ulsfn.'&'.join('&',@ulsstats);
-					if($obs eq '1') { $ulsout.="&1:"; }
+					if($obs eq '1') { $ulsout.="&1"; }
+					else { $ulsout.="&0"; }
+					if($rights eq '1') { $ulsout.="&1:"; }
 					else { $ulsout.="&0:"; }
 				    }
 				    closedir(LSDIR);