Fix English classes

This commit is contained in:
Filip Gralinski 2019-12-03 09:51:43 +01:00
parent 1ae14d383e
commit eb851a7d0f

View File

@ -163,7 +163,9 @@ sub check_if_the_right_task {
}
}
return 0 if $task_id =~ m{^TaskE} and $student_id != 148603 and $student_id != 148335 and $student_id != 148521 and $student_id != 148567;
return 0 if $task_id =~ m{^TaskE} and not is_estudent($student_id);
return 0 if $task_id =~ m{^TaskA} and is_estudent($student_id);
return 1;
}
@ -231,3 +233,49 @@ sub get_override_key {
return $id.'+'.$task;
}
sub is_estudent {
my ($id) = @_;
my $suffix = substr($id, 1);
my %estudents = map { $_ => 1 } split/\n/,<<'END_OF_NUMBERS';
16136
30291
30686
32746
32753
32754
32757
32759
32778
32813
32837
34595
34596
34598
34599
34603
34604
34608
34650
34654
39546
40549
42335
42611
42612
42613
42614
50169
50711
52484
84146
END_OF_NUMBERS
if ($estudents{$suffix}) {
return 1;
}
return 0;
}