transaction.diff
| b/lib/AMC/Import.pm | ||
|---|---|---|
| 122 | 122 |
$self->{'_scoring'}=$self->{'_data'}->module('scoring');
|
| 123 | 123 |
$self->{'_assoc'}=$self->{'_data'}->module('association');
|
| 124 | 124 |
$self->{'_capture'}=$self->{'_data'}->module('capture');
|
| 125 |
$self->{'_layout'}=$self->{'_data'}->module('layout');
|
|
| 125 | 126 | |
| 126 | 127 |
if($self->{'fich.noms'} && ! $self->{'noms'}) {
|
| 127 | 128 |
$self->{'noms'}=AMC::NamesFile::new($self->{'fich.noms'},
|
| ... | ... | |
| 187 | 188 | |
| 188 | 189 |
1; |
| 189 | 190 | |
| 190 |
__END__ |
|
| 191 |
__END__ |
|
| b/lib/AMC/Import/Gradescope.pm | ||
|---|---|---|
| 93 | 93 |
# reference to an array. |
| 94 | 94 |
for my $sc ($capture->student_copies) {
|
| 95 | 95 |
my ($sheet, $copy) = @$sc; |
| 96 |
my $ssb=$scoring->student_scoring_base(@$sc,$darkness_threshold); |
|
| 96 |
my $ssb=$scoring->student_scoring_base(@$sc,$darkness_threshold,1);
|
|
| 97 | 97 |
my $questions = $ssb->{'questions'};
|
| 98 | 98 |
while ( my ($amc_qid, $q) = each %{$questions}) {
|
| 99 | 99 |
# $amc_qid is the question numerical ID, and |
| b/t/02-amc-import-gradescope.t | ||
|---|---|---|
| 9 | 9 | |
| 10 | 10 |
plan tests => 8; |
| 11 | 11 | |
| 12 |
use AMC::Basic; |
|
| 12 | 13 |
use AMC::Import::Gradescope; |
| 13 | 14 |
use Gradescope::ScoresFile; |
| 14 | 15 | |
| ... | ... | |
| 47 | 48 |
}; |
| 48 | 49 | |
| 49 | 50 |
my $sql_get_manual = "select manual from capture_zone where student=? and copy=0 and id_a=? and id_b=?"; |
| 51 |
$importer->{'_capture'}->begin_transaction('xxxx');
|
|
| 50 | 52 |
is($importer->{'_capture'}->sql_single($sql_get_manual,28,33,5), -1);
|
| 53 |
#set_debug('stderr');
|
|
| 51 | 54 |
$importer->do_import($gs,'email','email',$qmap); |
| 52 | 55 |
is($importer->{'_capture'}->sql_single($sql_get_manual,28,33,5), 1);
|
| 56 |
$importer->{'_capture'}->end_transaction('xxxx');
|
|
| 53 | 57 | |
| 54 | 58 | |
| 55 | 59 | |
| 56 |
TODO: {
|
|
| 57 |
|
|
| 58 |
} |
|