Commit 358f179b authored by Robert Ricci's avatar Robert Ricci

Two new flags, plus totals for the flags

Add flags for not submitted, and submitted but not started

Also, print out totals for the flags and users at the end
parent 6c503819
......@@ -3,6 +3,8 @@ use Time::Piece;
#
# Meanings of the flags at the end of the line:
# N: Not (yet) submitted
# T: TODO: submitted by grading not started
# D: Done: graded locally, and local branch matches the remote one
# I: In progress: branch exists locally, but latest commit does not look like
# it contains a final score
......@@ -75,6 +77,8 @@ foreach my $branch (@branches) {
}
}
my %flagcounts;
my $total = 0;
foreach my $student (sort keys %students) {
my $submitted = exists($students{$student}{submitted})?
$students{$student}{submitted} : "";
......@@ -82,12 +86,33 @@ foreach my $student (sort keys %students) {
my $graded = exists($students{$student}{graded})?
$students{$student}{graded} : "";
my $flag = exists($students{$student}{'flag'})?
$students{$student}{'flag'} : "";
my $flag;
if (exists($students{$student}{'flag'})) {
$flag = $students{$student}{'flag'};
} else {
if (exists($students{$student}{submitted})) {
$flag = "T";
} else {
$flag = "N";
}
}
if (exists($flagcounts{$flag})) {
$flagcounts{$flag}++;
} else {
$flagcounts{$flag} = 1;
}
$total++;
printf("%16s - %12s - %12s - %1s\n", $student, $submitted, $graded,$flag);
}
foreach my $flag (sort keys %flagcounts) {
print "$flag: $flagcounts{$flag} ";
}
print "Total: $total\n";
sub get_date($) {
my ($branch) = @_;
my $unixdate = `git show -s --format=%ct $branch`;
......
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