[LON-CAPA-cvs] cvs: loncom /cgi userstatus.pl

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 27 Aug 2003 20:35:24 -0000


albertel		Wed Aug 27 16:35:24 2003 EDT

  Modified files:              
    /loncom/cgi	userstatus.pl 
  Log:
  - restoring the old simple output to look like the previous one
  
  
Index: loncom/cgi/userstatus.pl
diff -u loncom/cgi/userstatus.pl:1.5 loncom/cgi/userstatus.pl:1.6
--- loncom/cgi/userstatus.pl:1.5	Wed Aug 27 14:20:11 2003
+++ loncom/cgi/userstatus.pl	Wed Aug 27 16:35:24 2003
@@ -129,8 +129,16 @@
 	print "<b>Load Average:<b> ".$loadavg;
 	print "</body></html>";
     } else {
-	foreach (sort keys %usercount) {
-	    print $_.'='.$usercount{$_}.'&';
+	foreach my $l1 (sort keys %usercount) {
+	    foreach my $l2 (sort keys %{$usercount{$l1}}) {
+		foreach my $l3 (sort keys %{$usercount{$l1}{$l2}}) {
+		    print $l1.'_'.$l2.'_'.$l3.'='.$usercount{$l1}{$l2}{$l3}.'&';
+		}
+	    }
+	}
+	#clusterstatus values
+	foreach my $act (@actl) {
+	    print "$act=".$usercount{'Overall'}{'all'}{$act}.'&';
 	}
 	print 'loadavg='.$loadavg;
     }