[LON-CAPA-cvs] cvs: loncom / lond
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 03 Jan 2005 16:34:47 -0000
albertel Mon Jan 3 11:34:47 2005 EDT
Modified files:
/loncom lond
Log:
- adding () formating it to 80 chars, and simplifying the code
Index: loncom/lond
diff -u loncom/lond:1.273 loncom/lond:1.274
--- loncom/lond:1.273 Mon Jan 3 11:08:07 2005
+++ loncom/lond Mon Jan 3 11:34:46 2005
@@ -2,7 +2,7 @@
# The LearningOnline Network
# lond "LON Daemon" Server (port "LOND" 5663)
#
-# $Id: lond,v 1.273 2005/01/03 16:08:07 albertel Exp $
+# $Id: lond,v 1.274 2005/01/03 16:34:46 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -58,7 +58,7 @@
my $status='';
my $lastlog='';
-my $VERSION='$Revision: 1.273 $'; #' stupid emacs
+my $VERSION='$Revision: 1.274 $'; #' stupid emacs
my $remoteVERSION;
my $currenthostid="default";
my $currentdomainid;
@@ -3198,8 +3198,9 @@
# owner - optional supplied username of owner to filter
# the dump. Only courses for which the course
# owner matches the supplied username will be
-# returned. Implicit assumption that owner is a user
-# in the domain in which the course database is defined.
+# returned. Implicit assumption that owner
+# is a user in the domain in which the
+# course database is defined.
# $client - The socket open on the client.
# Returns:
# 1 - Continue processing.
@@ -3233,15 +3234,9 @@
if ($hashref) {
while (my ($key,$value) = each(%$hashref)) {
my ($descr,$lasttime,$inst_code,$owner);
- my @courseitems = split/:/,$value;
- $descr = shift @courseitems;
- $lasttime = pop @courseitems;
- if (@courseitems > 0) {
- $inst_code = shift @courseitems;
- }
- if (@courseitems > 0) {
- $owner = shift @courseitems;
- }
+ my @courseitems = split(/:/,$value);
+ $lasttime = pop(@courseitems);
+ ($descr,$inst_code,$owner)=@courseitems;
if ($lasttime<$since) { next; }
my $match = 1;
unless ($description eq '.') {