generate "ct/index.html";
generate "ct/$_/index.thml" for contests;
-generate "ct/$_/log/st.html" for contests;
generate "us/index.html";
generate "us/$_.html" for users;
for my $ct (undef, contests) {
local $Gruntmaster::Data::contests = $ct;
my $ctp = defined $ct ? "ct/$ct/" : '';
+ generate "${ctp}log/st.html";
generate "${ctp}log/index.html";
my $pagecnt = jobcard / Gruntmaster::Page::Log::PAGE_SIZE;
generate "${ctp}log/$_.html" for 1 .. $pagecnt;
declaregen 'Us::Entry' => qr,^us/$component$,;
declaregen Ct => qr,^ct/index$,;
declaregen 'Ct::Entry' => qr,^ct/$component/index$,;
- declaregen St => qr,^ct/$component/log/st$,;
+ declaregen St => qr,^${contest}log/st$,;
declaregen Log => qr,^${contest}log/(?:\d+|index)$,;
declaregen 'Log::Entry' => qr,^${contest}log/job/$component$,;
declaregen Submit => qr,^${contest}submit$,;
our @ISA = qw/Gruntmaster::Page::Base/;
our $VERSION = '0.001';
-use constant => TEMPLATES => {
+use constant TEMPLATES => {
en => <<'HTML',
<table border>
<thead>
sub _generate{
my ($self, $htc, $path, $lang) = @_;
- local $Gruntmaster::Data::contest = ($path =~ m,^ct/([^/]+)/,)[0];
+ $path =~ m,^(?:ct/([^/]+)/)?,;
+ local $Gruntmaster::Data::contest = $1;
- my @problems = sort problems;
+ my @problems = problems;
+ @problems = sort @problems;
my %scores;
for (1 .. jobcard) {
if (job_result_text =~ m/^(\d+)/) {
scores => [map { $scores{$user}{$_} // '-'} @problems],
}
} keys %scores;
- $htc->param(problems => \@problems);
+ $htc->param(problems => [map { problem_name } @problems ]);
$htc->param(st => \@st);
}