From f4b0379a18102fe9dec2984d57c3428ffa615bb3 Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Mon, 2 Mar 2015 18:49:55 -0500 Subject: [PATCH] Suppress printout of (-N) in worthless sections --- grade.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/grade.pl b/grade.pl index 1a3a77f..737fe14 100755 --- a/grade.pl +++ b/grade.pl @@ -93,7 +93,11 @@ sub doDing($) { # {{{ } else { $dingsum += $1; } - push @$dingtext, "($1)"; + # If the section has point value, label the deduction here + # with its value. Zero-point sections don't merit the clutter. + if ($secmax != 0) { + push @$dingtext, "($1)"; + } untilDefinesDot(sub ($) { push @$dingtext, @_; }); push @$dingtext, ""; return; -- 2.50.1