diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index ad9ec43..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,16 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: "npm" # See documentation for possible values - directory: "/" # Location of package manifests - schedule: - interval: "weekly" - - - package-ecosystem: "composer" # See documentation for possible values - directory: "/" # Location of package manifests - schedule: - interval: "weekly" diff --git a/api/src/S3Manager.php b/api/src/S3Manager.php index 517f983..175cc32 100644 --- a/api/src/S3Manager.php +++ b/api/src/S3Manager.php @@ -20,7 +20,7 @@ class S3Manager function __construct($S3_KEY, $S3_SECRET, $S3_SERVER, $S3_IMAGE_BUCKET) { $this->s3Client = new S3Client([ - 'region' => '', + 'region' => 'us-east-1', 'version' => '2006-03-01', 'endpoint' => $S3_SERVER, 'credentials' => [ diff --git a/api/src/Schedule.php b/api/src/Schedule.php index 15db9a3..c18d99e 100644 --- a/api/src/Schedule.php +++ b/api/src/Schedule.php @@ -22,7 +22,20 @@ private function icalFormatTime($time) { . "00"; } + private function firstDayAfterDate($weekday, $startDate) { + $weekdayOfStart = date('w', $startDate); + if ($weekdayOfStart > $weekday) { + // Try next week: + // 5 = 7 - 1 (we only go up to six) - 1 (we don't want to double count "today") + $startDate += 60*60*24*(5-$weekDayOfStart); + $weekdayOfStart = 0; + } + // weekday - weekDayOfStart = number of days between now and the first instance of that week day + return $startDate + (60*60*24*($weekday-$weekdayOfStart)); + } + public function generateIcal($schedule) { + date_default_timezone_set('America/New_York'); // Globals global $HTTPROOTADDRESS, $dbConn; @@ -67,7 +80,7 @@ public function generateIcal($schedule) { // This /could/ be done via the RRULE WKST param, but that means // translating days from numbers to some other esoteric format. // @TODO: Retrieve the timezone from php or the config file - $day = date("Ymd", $termStart + ((60*60*24)*($time['day']-1))); + $day = date("Ymd", $this->firstDayAfterDate($time['day'], $termStart)); $code .= "DTSTART;TZID=America/New_York:{$day}T{$startTime}\r\n"; $code .= "DTEND;TZID=America/New_York:{$day}T{$endTime}\r\n"; @@ -217,4 +230,4 @@ public function renderSvg($svg, $id) { return false; } } -} \ No newline at end of file +} diff --git a/assets/src/modules/sm/Search/templates/search.html b/assets/src/modules/sm/Search/templates/search.html index a428858..2702dab 100644 --- a/assets/src/modules/sm/Search/templates/search.html +++ b/assets/src/modules/sm/Search/templates/search.html @@ -87,7 +87,7 @@

Search Courses

- +
@@ -166,6 +166,7 @@

Search Courses