3 # Syntax: mo-score <expr> ... (one expr per column)
4 # where <expr> is ["title":]<perl-expression> containing
5 # $user short user name
7 # $<number> value in specified column
8 # $<task> total number of points for this task or failure indicator
9 # $<task>:<test> number of points per specified test
11 print "Scanning contestants... ";
12 open (CT, "bin/mo-get-users --full |") || die "Cannot get list of contestants";
19 print 0+keys %users, "\n";
21 print "Scanning task results... ";
22 foreach $u (keys %users) {
23 opendir (D, "testing/$u") or next;
24 foreach $t (readdir(D)) {
26 $tt = "testing/$u/$t/points";
29 open (X, $tt) || die "Unable to open $tt";
32 /^(\d+) (\d+)(.*)/ || die "Parse error: $_";
36 $results{$u}{$t}{$ttest} = $tpts;
37 $remarks{$u}{$t}{$ttest} = $trem;
41 if $msg =~ /^Compile / { $cmt = "CE"; }
42 elif $msg =~ /^Time limit exceeded/ { $cmt = "TO"; }
43 elif $msg =~ /^Exited with error / { $cmt = "RE"; }
44 elif $msg =~ /^Caught fatal signal / { $cmt = "SG"; }
46 $comment{$u}{$t}{$ttest} = $cmt;