Diff for /doc/loncapafiles/update_queue_slots.piml between versions 1.3 and 1.5

version 1.3, 2006/06/27 14:26:37 version 1.5, 2015/03/16 05:25:47
Line 80  sub process_gradingqueue_file { Line 80  sub process_gradingqueue_file {
     my $backup = "\b"x(8+$count2+14+$count+6);      my $backup = "\b"x(8+$count2+14+$count+6);
     $updated++;      $updated++;
     print($backup."Updated $last directories, $updated files");      print($backup."Updated $last directories, $updated files");
     my $db = &LONCAPA::locking_hash_tie($_,'nohist_',&GDBM_WRCREAT());      my $db = &LONCAPA::locking_hash_tie($_,&GDBM_WRCREAT());
     if ($type eq 'queue') {      if ($type eq 'queue') {
  foreach my $key (keys(%{$db})) {   foreach my $key (keys(%{$db})) {
     my $real_key = &unescape($key);      my $real_key = &unescape($key);
Line 132  sub process_gradingqueue_file { Line 132  sub process_gradingqueue_file {
   
   
 sub main {  sub main {
      print("Updating grading queue and slot definitions\n");      my $doupdate;
      my $perlvar=LONCAPA::Configuration::read_conf('loncapa.conf');      if (-e '/etc/loncapa-release') {
      find(          if (open(PIPE,"cat /etc/loncapa-release.prev |grep '^LON-CAPA release' |")) {
          {              if (<PIPE> =~ /^\QLON-CAPA release \E(CVS_HEAD|\d+\.\d+\.\d+\.?\w*)\-\d+$/) {
      no_chdir   => 1,                  my $previous = $1;
      wanted     => \&process_gradingqueue_file,                  unless ($previous eq 'CVS_HEAD') {
  },                       my ($major,$minor) = ($previous =~ /^(\d+)\.(\d+)\./);
          $perlvar->{'lonUsersDir'});                      if (($major ne '') && ($minor ne '')) {
      print("\n");                          if (($major == 2) && ($minor < 10)) {
                               $doupdate = 1;
                           }
                       }
                   }
               }
               close(PIPE);
           }
        }
   
        if ($doupdate) {
            print("Updating grading queue and slot definitions\n");
            my $perlvar=LONCAPA::Configuration::read_conf('loncapa.conf');
            find(
                {
            no_chdir   => 1,
            wanted     => \&process_gradingqueue_file,
        },
                $perlvar->{'lonUsersDir'});
            print("\n");
        } else {
            print("Update of grading queue and slot definitions not required.\n"); 
        }
 }  }
   
 &main();  &main();

Removed from v.1.3  
changed lines
  Added in v.1.5


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>