X-Git-Url: http://git.tpope.net/?p=tpope-extra.git;a=blobdiff_plain;f=perl%2Fsctweb;h=1ca3d7c4fa6044246989c58d09c0d131d8b57db9;hp=15ab1ef17685b640aa250b615ee0608ea9f58138;hb=57c2826cf1125692d62af38a5cdaa75465915e30;hpb=5b7718beb78ff32f4f954c675a0934e9386badad
diff --git a/perl/sctweb b/perl/sctweb
index 15ab1ef..1ca3d7c 100755
--- a/perl/sctweb
+++ b/perl/sctweb
@@ -61,7 +61,7 @@ sub US_Labor # First Monday after the first Sunday in September
}
my $config = $ENV{HOME} . "/.sctwebrc";
-if ($ARGV[0] eq '-f') {
+if ($ARGV[0] eq '-F') {
shift;
$config = shift;
}
@@ -181,6 +181,8 @@ sub off_for_exams {
} elsif($time =~ /$ending/) {
return $lastday-5;
}
+ } elsif($days eq "5") {
+ return $lastday-2;
}
return wantarray ? () : "";
}
@@ -230,7 +232,7 @@ sub get_schedule_terms {
} elsif ($localtime[4]<10) { # through Oct 31
@sterms=((1900+$localtime[5]).$a[0]);
} else {
- @sterms=((1900+$localtime[5])."1",(1901+$localtime[5])."2");
+ @sterms=((1900+$localtime[5]).$a[0],(1901+$localtime[5]).$a[1]);
}
return @sterms;
}
@@ -557,7 +559,7 @@ sub do_html_schedule {
sub do_html_grades {
my @readheaders = ("Section ID", "Course Title", "Grade", "Earned Hours", "Quality Hours", "Quality Points", "GPA");
- my @showheaders = ("Section ID", "Course Title", "Grade", "Earned
Hours", "Quality
Hours", "Quality
Points", "GPA");
+ my @showheaders = ("Section ID", "Course Title", "Grade", "Earned
Hours", "Quality
Hours", "Quality
Points");
my ($row, $lastrow);
my $te = new HTML::TableExtract( headers => [ @readheaders ] );
my $response = $ua->get("$url&tserve_tip_write=||WID|SID|PIN|Term&tserve_trans_config=rgrdterm.cfg"); # Valid grading terms
@@ -581,14 +583,19 @@ sub do_html_grades {
$lastrow=$row;
next if $row->[0] =~ /:/;
print '