Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Robert Ricci
Evaluating Networked Systems
Commits
614fb7d6
Commit
614fb7d6
authored
Feb 17, 2014
by
Robert Ricci
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start of a script to add up scores by student
parent
216d9ddb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
scripts/compute-totals
scripts/compute-totals
+22
-0
No files found.
scripts/compute-totals
0 → 100755
View file @
614fb7d6
#!/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
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment