Skip to content

Commit ea3327f

Browse files
authoredDec 24, 2023
Merge pull request #337 from ComputerScienceHouse/develop
Merge dev onto master
2 parents 64c75fe + 5356dc2 commit ea3327f

File tree

7 files changed

+39
-41
lines changed

7 files changed

+39
-41
lines changed
 

‎.github/dependabot.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

‎api/src/S3Manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class S3Manager
2020

2121
function __construct($S3_KEY, $S3_SECRET, $S3_SERVER, $S3_IMAGE_BUCKET) {
2222
$this->s3Client = new S3Client([
23-
'region' => '',
23+
'region' => 'us-east-1',
2424
'version' => '2006-03-01',
2525
'endpoint' => $S3_SERVER,
2626
'credentials' => [

‎api/src/Schedule.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,20 @@ private function icalFormatTime($time) {
2222
. "00";
2323
}
2424

25+
private function firstDayAfterDate($weekday, $startDate) {
26+
$weekdayOfStart = date('w', $startDate);
27+
if ($weekdayOfStart > $weekday) {
28+
// Try next week:
29+
// 5 = 7 - 1 (we only go up to six) - 1 (we don't want to double count "today")
30+
$startDate += 60*60*24*(5-$weekDayOfStart);
31+
$weekdayOfStart = 0;
32+
}
33+
// weekday - weekDayOfStart = number of days between now and the first instance of that week day
34+
return $startDate + (60*60*24*($weekday-$weekdayOfStart));
35+
}
36+
2537
public function generateIcal($schedule) {
38+
date_default_timezone_set('America/New_York');
2639
// Globals
2740
global $HTTPROOTADDRESS, $dbConn;
2841

@@ -67,7 +80,7 @@ public function generateIcal($schedule) {
6780
// This /could/ be done via the RRULE WKST param, but that means
6881
// translating days from numbers to some other esoteric format.
6982
// @TODO: Retrieve the timezone from php or the config file
70-
$day = date("Ymd", $termStart + ((60*60*24)*($time['day']-1)));
83+
$day = date("Ymd", $this->firstDayAfterDate($time['day'], $termStart));
7184

7285
$code .= "DTSTART;TZID=America/New_York:{$day}T{$startTime}\r\n";
7386
$code .= "DTEND;TZID=America/New_York:{$day}T{$endTime}\r\n";
@@ -217,4 +230,4 @@ public function renderSvg($svg, $id) {
217230
return false;
218231
}
219232
}
220-
}
233+
}

‎assets/src/modules/sm/Search/templates/search.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ <h2 class="panel-title control-label pull-left">Search Courses</h2>
8787
<div class="form-group">
8888
<label class="control-label col-sm-4" for="search.params.description">Keywords:</label>
8989
<div class="col-sm-8">
90-
<input type="text" id="search.params.description" ng-model="search.params.description" name="description" class="mousetrap form-control" placeholder="(comma delmited)">
90+
<input type="text" id="search.params.description" ng-model="search.params.description" name="description" class="mousetrap form-control" placeholder="(comma delimited)">
9191
</div>
9292
</div>
9393
<div class="form-group">
@@ -166,6 +166,7 @@ <h2 class="panel-title control-label pull-left">Search Courses</h2>
166166
</div>
167167
<div class="form-group">
168168
<select id="searchPagination-pageSize" class="form-control mousetrap" ng-model="searchPagination.pageSize">
169+
<option value="1">1</option>
169170
<option value="3">3</option>
170171
<option value="5">5</option>
171172
<option value="10">10</option>

‎composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}
2222
],
2323
"require": {
24-
"php": ">=7.1",
24+
"php": ">=7.3",
2525
"aws/aws-sdk-php": "^3.69",
2626
"ext-imagick": "*",
2727
"ext-json": "*"

‎package.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,25 +49,26 @@
4949
},
5050
"homepage": "https://schedule.csh.rit.edu",
5151
"devDependencies": {
52-
"@datadog/browser-rum": "^3.6.10",
52+
"@datadog/browser-rum": "^4.8.1",
5353
"@types/angular": "1.5",
5454
"@types/google.analytics": "0.0.42",
55-
"@types/mousetrap": "^1.6.8",
56-
"@typescript-eslint/eslint-plugin": "^4.33.0",
57-
"@typescript-eslint/parser": "^4.33.0",
55+
"@types/mousetrap": "^1.6.9",
56+
"@typescript-eslint/eslint-plugin": "^5.21.0",
57+
"@typescript-eslint/parser": "^5.21.0",
5858
"del": "^6.0.0",
59-
"eslint": "^7.32.0",
60-
"eslint-config-standard": "^16.0.3",
61-
"eslint-plugin-import": "^2.24.2",
59+
"eslint": "^8.14.0",
60+
"eslint-config-standard": "^17.0.0",
61+
"eslint-plugin-import": "^2.26.0",
62+
"eslint-plugin-n": "^15.2.0",
6263
"eslint-plugin-node": "^11.1.0",
63-
"eslint-plugin-promise": "^5.1.0",
64+
"eslint-plugin-promise": "^6.0.0",
6465
"eslint-plugin-standard": "^5.0.0",
6566
"event-stream": "^4.0.1",
6667
"gulp": "^4.0.2",
6768
"gulp-concat": "^2.6.1",
6869
"gulp-htmlmin": "^5.0.1",
6970
"gulp-jshint": "^2.1.0",
70-
"gulp-less": "^4.0.0",
71+
"gulp-less": "^5.0.0",
7172
"gulp-minify-css": "^1.2.4",
7273
"gulp-ng-annotate": "^2.1.0",
7374
"gulp-rename": "^2.0.0",
@@ -77,7 +78,7 @@
7778
"gulp-typescript": "^5.0.1",
7879
"gulp-uglify": "^2.0.0",
7980
"install": "^0.13.0",
80-
"typescript": "^4.4.3",
81+
"typescript": "^4.6.4",
8182
"vinyl-paths": "^3.0.0"
8283
}
8384
}

‎tsconfig.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
2-
"include": [
3-
"./assets/src/modules/sm/**/*.ts"
4-
],
5-
"exclude": ["./node_modules"],
6-
"compilerOptions": {
7-
"module": "es2015",
8-
"allowJs": false,
9-
"noImplicitAny": false,
10-
"target": "es5",
11-
}
2+
"include": ["./assets/src/modules/sm/**/*.ts"],
3+
"exclude": ["./node_modules"],
4+
"compilerOptions": {
5+
"module": "es2015",
6+
"moduleResolution": "node",
7+
"allowJs": false,
8+
"noImplicitAny": false,
9+
"target": "es5"
10+
}
1211
}

0 commit comments

Comments
 (0)
Please sign in to comment.