$templates{$_} .= footer $_ for keys %templates;
sub generate{
- $_[0] =~ m,(?:ct/([^/])+/)?log/(\w+)\.html$,;
+ $_[0] =~ m,(?:ct/([^/])+/)?pb/(\w+)\.html$,;
my ($contest, $id) = ($1, $2);
my $htc = HTML::Template::Compiled->new(scalarref => \$templates{$_[1]});
}
$htc->param(formats => FORMATS);
$htc->param(id => $id);
- local $Gruntmaster::Data::contest = ($_[0] =~ m,(?:ct/([^/])+/)?,)[0];
+ local $Gruntmaster::Data::contest = $contest if $contest;
$htc->param(name => problem_name $id);
- $htc->param(statement => problem_statement $id, $_[2]);
+ $htc->param(statement => problem_statement $id);
$htc->output
}