Archived
1
0

Activate mail_error on grading script

This commit is contained in:
Mercier Pierre-Olivier 2013-11-14 15:26:17 +01:00
parent 95c6d77613
commit e11d9082da
2 changed files with 5 additions and 7 deletions

View File

@ -7,8 +7,6 @@ use Carp;
use Pod::Usage;
use Text::ParseWords;
use lib "../../";
use ACU::Defense;
use ACU::Grading;
use ACU::Log;
@ -16,6 +14,8 @@ use ACU::LDAP;
use ACU::Process;
use ACU::Trace;
$ACU::Log::mail_error = 1;
our $basedir = "/intradata";
sub process

View File

@ -12,6 +12,8 @@ use ACU::Log;
use ACU::LDAP;
use ACU::Process;
$ACU::Log::mail_error = 1;
our $basedir = "/intradata";
sub process
@ -23,11 +25,7 @@ sub process
my $year = shift @args // LDAP::get_year;
# Project existing?
if (! -d "$basedir/$year/$project_id")
{
log ERROR, "Unable to find $project_id in $year";
return "Unable to find $project_id in $year\n";
}
croak "Unable to find $project_id in $year" if (! -d "$basedir/$year/$project_id");
my %grades;
my @headers;