]>
iEval git - gruntmaster-page.git/blob - lib/Gruntmaster/Page/Pb.pm
8e4a40886e26d329c6a113d84e97ed209ecd6f19
1 package Gruntmaster
::Page
::Pb
;
6 use Gruntmaster
::Page
::Base pb
=> 'Problems';
7 our @ISA = qw
/Gruntmaster::Page::Base/;
8 our $VERSION = '0.001';
10 use constant TEMPLATES
=> {
15 <tmpl_loop beginner><li><a href="<tmpl_var id>.var"><tmpl_var name></a>
20 <tmpl_loop easy><li><a href="<tmpl_var id>.var"><tmpl_var name></a>
25 <tmpl_loop medium><li><a href="<tmpl_var id>.var"><tmpl_var name></a>
30 <tmpl_loop hard><li><a href="<tmpl_var id>.var"><tmpl_var name></a>
35 <tmpl_loop problems><li><a href="<tmpl_var id>.var"><tmpl_var name></a>
42 my ($self, $htc, $path, $lang) = @_;
44 $path =~ m
,^(?
:ct
/([^/]+)/)?pb/index
.html
$,;
45 local $Gruntmaster::Data
::contest
= $1;
47 my @problems = sort { $b->{name
} cmp $a->{name
} } map +{
50 level
=> problem_level
}, problems
;
52 for my $d (qw
/beginner easy medium advanced hard/) {
53 $htc->param($d => [grep {$_->{level
} and $_->{level
} eq $d} @problems]);
55 $htc->param(levels
=> grep { $_->{level
} } @problems);
56 $htc->param(problems
=> \
@problems);
This page took 0.048368 seconds and 3 git commands to generate.