version 1.4, 2006/06/28 20:48:04
|
version 1.5, 2015/03/16 05:25:47
|
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(); |