my ($self) = @_;
my $ct = $self->id;
- my @problems = map { $_->rawproblem } $self->contest_problems->search({contest => $ct}, {qw/join problem order_by problem.level/});
+ my @problems = map { $_->rawproblem } $self->contest_problems->search({contest => $ct}, {qw/join problem order_by problem.value/});
my (%scores, %tries, %opens);
$opens{$_->rawproblem, $_->rawowner} = $_ for $self->opens->search({contest => $ct});
for my $job ($self->jobs->search({contest => $ct, result => {'!=', undef}}, {qw/order_by me.id prefetch/ => [qw/problem/]})) {
my %user_to_name = map { $_->id => $_->name } $self->result_source->schema->users->all;
+ say STDERR join "\n\n", @problems;
my @st = sort { $b->{score} <=> $a->{score} or $a->{user} cmp $b->{user} } map { ## no critic (ProhibitReverseSortBlock)
my $user = $_;
+{