From 077b9ca591ea5e907d975f38449e3fefeb61e815 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 12 Dec 2005 03:33:14 +0000 Subject: [PATCH] Allow for no "cumulative" line --- perl/schedproc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/perl/schedproc b/perl/schedproc index 81f4a1a..2a80bc3 100755 --- a/perl/schedproc +++ b/perl/schedproc @@ -586,13 +586,15 @@ sub do_html_grades { print "\n"; } } - my $lastrow = $grades->{'cumulative'}->[scalar @{$grades->{'cumulative'}}-1]; - print 'Cumulative: through ', capitalize($lastrow->{'term'}); - print ''; - print $lastrow->{'gpa'}; - print ''; - print join('', ($lastrow->{'earned'}, $lastrow->{'hours'}, $lastrow->{'points'})); - print "\n"; + if(exists($grades->{'cumulative'})) { + my $lastrow = $grades->{'cumulative'}->[scalar @{$grades->{'cumulative'}}-1]; + print 'Cumulative: through ', capitalize($lastrow->{'term'}); + print ''; + print $lastrow->{'gpa'}; + print ''; + print join('', ($lastrow->{'earned'}, $lastrow->{'hours'}, $lastrow->{'points'})); + print "\n"; + } print "\n"; select STDOUT; } -- 2.30.2