projects
/
gruntmaster-page.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d58bf00
)
Anchor a regex in St.pm
author
Marius Gavrilescu
<marius@ieval.ro>
Sat, 12 Apr 2014 21:35:09 +0000
(
00:35
+0300)
committer
Marius Gavrilescu
<marius@ieval.ro>
Sat, 12 Apr 2014 21:35:09 +0000
(
00:35
+0300)
lib/Gruntmaster/Page/St.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Gruntmaster/Page/St.pm
b/lib/Gruntmaster/Page/St.pm
index fad8f478bdf82cf12a94b878f58d1a13d172f70c..9ed2a31c67c6c05d6b911de09c9af400dcd02bbf 100644
(file)
--- a/
lib/Gruntmaster/Page/St.pm
+++ b/
lib/Gruntmaster/Page/St.pm
@@
-36,7
+36,7
@@
sub _generate{
next if $time < 0;
my $value = $job->problem->value // LEVEL_VALUES->{$job->problem->level};
my $factor = $job->result ? 0 : 1;
- $factor = $1 / 100 if $job->result_text =~ /
(\d+
)/;
+ $factor = $1 / 100 if $job->result_text =~ /
^(\d+
)/;
$scores{$job->owner->id}{$job->problem->id} = int ($factor * calc_score ($value, $time, $tries{$job->owner->id}{$job->problem->id}, $ct->stop - $ct->start));
$tries{$job->owner->id}{$job->problem->id}++;
} else {
This page took
0.009873 seconds
and
4
git commands to generate.