Commit 614fb7d6 authored by Robert Ricci's avatar Robert Ricci

Start of a script to add up scores by student

parent 216d9ddb
#!/usr/bin/perl -w
use strict;
foreach my $student (`list-students`) {
chomp $student;
my $total = 0;
my $totalpossible = 0;
foreach my $hw (`list-hw`) {
chomp $hw;
my $branch = "$hw-graded-$student";
if (`git show -s --format=%s $branch` =~ /^\s*Total score: (\d+(\.\d+)?)\s*\/\s*(\d+)/) {
my ($score, $possible) = ($1,$3);
$total += $score;
$totalpossible += $possible;
} else {
die "No score for student $student\n";
}
}
printf "%10s %3.02f / %3.02f = %3.02f\n", $student, $total,
$totalpossible, ($total/$totalpossible)*100;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment