Commit 92c7ec23 authored by Robert Ricci's avatar Robert Ricci

Script to push all grades for a specific homework

parent b9f7ee67
#!/usr/bin/perl -w
use strict;
# Dumb check to make it harder to run this by accident
die "Usage: $0 [-y] <hw>\n" unless ((scalar(@ARGV) == 1) || (scalar(@ARGV) == 2));
my $hw;
my $dryrun;
if (scalar(@ARGV) == 1) {
$hw = $ARGV[0];
$dryrun = 1;
} else {
$hw = $ARGV[1];
$dryrun = 0;
}
if ($dryrun) {
print "## NOTE: Dry run, use '-y' to actually push!\n"
}
foreach my $student (`list-students`) {
chomp $student;
my $command = "push-grade $hw $student";
print "$command\n";
if (!$dryrun) {
system "$command";
}
}
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