[LON-CAPA-cvs] cvs: loncom /build Makefile doc/loncapafiles update_queue_slots.piml

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 16 Jun 2006 19:38:17 -0000


albertel		Fri Jun 16 15:38:17 2006 EDT

  Modified files:              
    /doc/loncapafiles	update_queue_slots.piml 
    /loncom/build	Makefile 
  Log:
  - run the @ ->:  conversions cript
  
  
Index: doc/loncapafiles/update_queue_slots.piml
diff -u doc/loncapafiles/update_queue_slots.piml:1.1 doc/loncapafiles/update_queue_slots.piml:1.2
--- doc/loncapafiles/update_queue_slots.piml:1.1	Mon Jun  5 19:18:45 2006
+++ doc/loncapafiles/update_queue_slots.piml	Fri Jun 16 15:38:10 2006
@@ -3,7 +3,7 @@
 <!-- accesscount_seed.piml -->
 <!-- Matthew Hall -->
 
-<!-- $Id: update_queue_slots.piml,v 1.1 2006/06/05 23:18:45 albertel Exp $ -->
+<!-- $Id: update_queue_slots.piml,v 1.2 2006/06/16 19:38:10 albertel Exp $ -->
 
 <!--
 
@@ -54,8 +54,20 @@
     return $value;
 }
 
-my $updated;
+my $updated=0;
+my %dirs;
+my $last;
+my $total;
 sub process_gradingqueue_file {
+    my $which = (split('/',$_))[5];
+    $dirs{$which} = 1;
+    my $count2 = length("$last");
+    my $count = length("$updated");
+    my $backup = "\b"x(8+$count2+14+$count+6);
+    if (scalar(keys(%dirs)) > $last) {
+         $last = scalar(keys(%dirs));
+         print($backup."Updated $last directories, $updated files");
+    }
     return if ($_!~m/(gradingqueue|reviewqueue|slots|slot_reservations)\.db$/);
     my $type='queue';
     if ($1 eq 'slots') {
@@ -63,10 +75,11 @@
     } elsif ($1 eq 'slot_reservations') {
 	$type = 'reservation';
     }
+    my $count2 = length("$last");
     my $count = length("$updated");
+    my $backup = "\b"x(8+$count2+14+$count+6);
     $updated++;
-    print("\b"x(14+$count));
-    print("Updated $updated files");
+    print($backup."Updated $last directories, $updated files");
     my $prefix = $_;
     $prefix =~s/\.db$//;
     my $db = &amp;LONCAPA::_locking_hash_tie($prefix,'nohist_',&amp;GDBM_WRCREAT());
@@ -128,7 +141,7 @@
 	     no_chdir   =&gt; 1,
 	     wanted     =&gt; \&amp;process_gradingqueue_file,
 	 }, 
-         '/home/www/lonUsers/');
+         $perlvar->{'lonUsersDir'});
      print("\n");
 }
 
Index: loncom/build/Makefile
diff -u loncom/build/Makefile:1.181 loncom/build/Makefile:1.182
--- loncom/build/Makefile:1.181	Mon Jun  5 19:19:30 2006
+++ loncom/build/Makefile	Fri Jun 16 15:38:16 2006
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 
-# $Id: Makefile,v 1.181 2006/06/05 23:19:30 albertel Exp $
+# $Id: Makefile,v 1.182 2006/06/16 19:38:16 albertel Exp $
 
 # TYPICAL USAGE of this Makefile is primarily for two targets:
 # "make build" and "make install".
@@ -478,6 +478,7 @@
 	make reseval_fixup
 	make clean_file_permissions
 	make accesscount_seed
+	make update_queue_slots
 	make modify_config_files
 	make clearoutoldspreadsheetcache
 	make chkconfig