From 371d9e661a78146657c2f7a4f4d29913227cdc58 Mon Sep 17 00:00:00 2001 From: tmcnulty387 Date: Mon, 4 Nov 2024 14:16:05 -0500 Subject: [PATCH 01/27] Added banner stating that schedule maker isn't working --- assets/src/modules/sm/Generate/templates/generate.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/assets/src/modules/sm/Generate/templates/generate.html b/assets/src/modules/sm/Generate/templates/generate.html index 8e610c2..3d413a9 100644 --- a/assets/src/modules/sm/Generate/templates/generate.html +++ b/assets/src/modules/sm/Generate/templates/generate.html @@ -1,10 +1,15 @@
+
+ We are having an issue with ITS regarding getting class data. We are trying to resolve this with ITS, but in the meantime ScheduleMaker is not functional. We are sorry for the inconvenience! +
+
From f5b291f2f71fcf57176c8a768062f7ae143f11dd Mon Sep 17 00:00:00 2001 From: tmcnulty387 Date: Sun, 10 Nov 2024 14:35:23 -0500 Subject: [PATCH 02/27] Revert "Added banner stating that schedule maker isn't working" This reverts commit 371d9e661a78146657c2f7a4f4d29913227cdc58. --- assets/src/modules/sm/Generate/templates/generate.html | 5 ----- 1 file changed, 5 deletions(-) diff --git a/assets/src/modules/sm/Generate/templates/generate.html b/assets/src/modules/sm/Generate/templates/generate.html index 3d413a9..8e610c2 100644 --- a/assets/src/modules/sm/Generate/templates/generate.html +++ b/assets/src/modules/sm/Generate/templates/generate.html @@ -1,15 +1,10 @@
-
- We are having an issue with ITS regarding getting class data. We are trying to resolve this with ITS, but in the meantime ScheduleMaker is not functional. We are sorry for the inconvenience! -
-
From 2485bc3d5f9dd34573475a4595b41d65102dd2e1 Mon Sep 17 00:00:00 2001 From: Noah Hanford Date: Thu, 2 Apr 2026 20:52:06 -0400 Subject: [PATCH 03/27] Merge pull request #366 from ComputerScienceHouse/fix-ntid-classes Fix ntid classes --- .gitignore | 1 - Dockerfile | 4 +- api/generate.php | 2 +- composer.lock | 917 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + 5 files changed, 922 insertions(+), 3 deletions(-) create mode 100644 composer.lock diff --git a/.gitignore b/.gitignore index d8747bb..32fe1db 100644 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,3 @@ web.config vwd.webinfo WebEssentials-Settings.json vendor -composer.lock diff --git a/Dockerfile b/Dockerfile index da9f06a..8fa94a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ RUN npm run-script build FROM docker.io/php:7.3-apache LABEL author="Devin Matte " -RUN echo "deb-src http://deb.debian.org/debian buster main" >> /etc/apt/sources.list +RUN echo "deb-src http://archive.debian.org/debian buster main" >> /etc/apt/sources.list RUN apt-get -yq update && \ apt-get -yq install \ @@ -59,6 +59,8 @@ RUN a2enmod rewrite && a2enmod headers && a2enmod expires && \ sed -i '/Listen/{s/\([0-9]\+\)/8080/; :a;n; ba}' /etc/apache2/ports.conf && \ chmod og+rwx /var/lock/apache2 && chmod -R og+rwx /var/run/apache2 +RUN git config --global --add safe.directory /var/www/html + COPY . /var/www/html COPY --from=builder /usr/src/schedule/assets/prod /var/www/html/assets/prod diff --git a/api/generate.php b/api/generate.php index 57f634f..cf4bac0 100644 --- a/api/generate.php +++ b/api/generate.php @@ -67,7 +67,7 @@ function ajaxErrorHandler($errno, $errstr, $errfile, $errline) { } $course = strtoupper($course); - preg_match('/([A-Z]{4})[-\s]*(\d{0,3}[A-Z]?)?(?:[-\s]+(\d{0,2}[A-Z]?\d?))?/', $course, $courseParts); + preg_match('/([A-Z0-9]{4})[-\s]*(\d{0,3}[A-Z]?)?(?:[-\s]+(\d{0,2}[A-Z]?\d?))?/', $course, $courseParts); // Query base: Noncancelled courses from the requested term $query = "SELECT s.id diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..7a157d7 --- /dev/null +++ b/composer.lock @@ -0,0 +1,917 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "2d6132cfa9ea9861362ffda02bd1528e", + "packages": [ + { + "name": "aws/aws-crt-php", + "version": "v1.2.7", + "source": { + "type": "git", + "url": "https://github.com/awslabs/aws-crt-php.git", + "reference": "d71d9906c7bb63a28295447ba12e74723bd3730e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/awslabs/aws-crt-php/zipball/d71d9906c7bb63a28295447ba12e74723bd3730e", + "reference": "d71d9906c7bb63a28295447ba12e74723bd3730e", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35||^5.6.3||^9.5", + "yoast/phpunit-polyfills": "^1.0" + }, + "suggest": { + "ext-awscrt": "Make sure you install awscrt native extension to use any of the functionality." + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "AWS SDK Common Runtime Team", + "email": "aws-sdk-common-runtime@amazon.com" + } + ], + "description": "AWS Common Runtime for PHP", + "homepage": "https://github.com/awslabs/aws-crt-php", + "keywords": [ + "amazon", + "aws", + "crt", + "sdk" + ], + "support": { + "issues": "https://github.com/awslabs/aws-crt-php/issues", + "source": "https://github.com/awslabs/aws-crt-php/tree/v1.2.7" + }, + "time": "2024-10-18T22:15:13+00:00" + }, + { + "name": "aws/aws-sdk-php", + "version": "3.328.0", + "source": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-php.git", + "reference": "a99b58e166ae367f2b067937afb04e843e900745" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/a99b58e166ae367f2b067937afb04e843e900745", + "reference": "a99b58e166ae367f2b067937afb04e843e900745", + "shasum": "" + }, + "require": { + "aws/aws-crt-php": "^1.2.3", + "ext-json": "*", + "ext-pcre": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5", + "guzzlehttp/promises": "^1.4.0 || ^2.0", + "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "mtdowling/jmespath.php": "^2.6", + "php": ">=7.2.5", + "psr/http-message": "^1.0 || ^2.0" + }, + "require-dev": { + "andrewsville/php-token-reflection": "^1.4", + "aws/aws-php-sns-message-validator": "~1.0", + "behat/behat": "~3.0", + "composer/composer": "^1.10.22", + "dms/phpunit-arraysubset-asserts": "^0.4.0", + "doctrine/cache": "~1.4", + "ext-dom": "*", + "ext-openssl": "*", + "ext-pcntl": "*", + "ext-sockets": "*", + "nette/neon": "^2.3", + "paragonie/random_compat": ">= 2", + "phpunit/phpunit": "^5.6.3 || ^8.5 || ^9.5", + "psr/cache": "^1.0", + "psr/simple-cache": "^1.0", + "sebastian/comparator": "^1.2.3 || ^4.0", + "yoast/phpunit-polyfills": "^1.0" + }, + "suggest": { + "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", + "doctrine/cache": "To use the DoctrineCacheAdapter", + "ext-curl": "To send requests using cURL", + "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages", + "ext-sockets": "To use client-side monitoring" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Aws\\": "src/" + }, + "exclude-from-classmap": [ + "src/data/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Amazon Web Services", + "homepage": "http://aws.amazon.com" + } + ], + "description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project", + "homepage": "http://aws.amazon.com/sdkforphp", + "keywords": [ + "amazon", + "aws", + "cloud", + "dynamodb", + "ec2", + "glacier", + "s3", + "sdk" + ], + "support": { + "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", + "issues": "https://github.com/aws/aws-sdk-php/issues", + "source": "https://github.com/aws/aws-sdk-php/tree/3.328.0" + }, + "time": "2024-11-15T19:06:57+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.9.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^2.7.0", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-curl": "*", + "guzzle/client-integration-tests": "3.0.2", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.9.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2024-07-24T11:22:20+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2024-10-17T10:06:22+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.7.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.7.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2024-07-18T11:15:46+00:00" + }, + { + "name": "mtdowling/jmespath.php", + "version": "2.8.0", + "source": { + "type": "git", + "url": "https://github.com/jmespath/jmespath.php.git", + "reference": "a2a865e05d5f420b50cc2f85bb78d565db12a6bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/a2a865e05d5f420b50cc2f85bb78d565db12a6bc", + "reference": "a2a865e05d5f420b50cc2f85bb78d565db12a6bc", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "symfony/polyfill-mbstring": "^1.17" + }, + "require-dev": { + "composer/xdebug-handler": "^3.0.3", + "phpunit/phpunit": "^8.5.33" + }, + "bin": [ + "bin/jp.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "files": [ + "src/JmesPath.php" + ], + "psr-4": { + "JmesPath\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Declaratively specify how to extract elements from a JSON document", + "keywords": [ + "json", + "jsonpath" + ], + "support": { + "issues": "https://github.com/jmespath/jmespath.php/issues", + "source": "https://github.com/jmespath/jmespath.php/tree/2.8.0" + }, + "time": "2024-09-04T18:46:31+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory" + }, + "time": "2024-04-15T12:06:14+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.5.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "80d075412b557d41002320b96a096ca65aa2c98d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d", + "reference": "80d075412b557d41002320b96a096ca65aa2c98d", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-24T14:02:46+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": {}, + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=7.3", + "ext-imagick": "*", + "ext-json": "*" + }, + "platform-dev": {}, + "plugin-api-version": "2.6.0" +} diff --git a/package.json b/package.json index f002d68..95bc3c8 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "@types/angular": "1.5", "@types/google.analytics": "0.0.42", "@types/mousetrap": "^1.6.9", + "@types/node": "^12.20.55", "@typescript-eslint/eslint-plugin": "^5.21.0", "@typescript-eslint/parser": "^5.21.0", "del": "^6.0.0", From f32d05d81a584ada25ea18ea9d74335ee04860d4 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Thu, 3 Sep 2026 20:04:03 -0400 Subject: [PATCH 04/27] I updated the dump process to handle 3 new course fields: Prerequisites, Typically Offered, and Contact Hours. --- tools/processDump.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/processDump.php b/tools/processDump.php index 1277d2f..405e7ab 100644 --- a/tools/processDump.php +++ b/tools/processDump.php @@ -102,6 +102,9 @@ `acad_career` varchar(4) NOT NULL, `instruction_mode` varchar(2) NOT NULL, `course_descrlong` text NOT NULL, + `prereqs` text NOT NULL, + `typ_offr` text NOT NULL, + `ctc_hrs` text NOT NULL, PRIMARY KEY (`crse_id`,`crse_offer_nbr`,`strm`,`session_code`,`class_section`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; ENE; @@ -112,7 +115,7 @@ $parser->halt(["Error: Failed to create temporary class table", mysqli_error($dbConn)]); } -$parser->fileToTempTable("classes", $classFile, 24, $classSize, "procClassArray"); +$parser->fileToTempTable("classes", $classFile, 27, $classSize, "procClassArray"); fclose($classFile); // Build a temporary table for the meeting patterns @@ -266,9 +269,8 @@ $failures++; } $departmentsProc = mysqli_affected_rows($dbConn); - // Grab each COURSE from the classes table -$courseQuery = "SELECT strm, subject, units, acad_org, catalog_nbr, descr, course_descrlong,"; +$courseQuery = "SELECT strm, subject, units, acad_org, catalog_nbr, descr, course_descrlong, prereqs, typ_offr, ctc_hrs"; $courseQuery .= " crse_id, crse_offer_nbr, session_code"; $courseQuery .= " FROM classes WHERE strm < 20130 GROUP BY crse_id, strm, session_code"; $parser->debug("... Updating courses\n0%", false); @@ -298,10 +300,13 @@ // Escape the necessary fields $row['descr'] = mysqli_real_escape_string($dbConn, $row['descr']); $row['course_descrlong'] = mysqli_real_escape_string($dbConn, $row['course_descrlong']); + $row['prereqs'] = mysqli_real_escape_string($dbConn, $row['prereqs']); + $row['typ_offr'] = mysqli_real_escape_string($dbConn, $row['typ_offr']); + $row['ctc_hrs'] = mysqli_real_escape_string($dbConn, $row['ctc_hrs']); // Insert or update the course @$courseId = $parser->insertOrUpdateCourse($row['qtr'], $row['acad_org'], $row['subject'], $row['catalog_nbr'], - (int)$row['units'], $row['descr'], $row['course_descrlong']); + (int)$row['units'], $row['descr'], $row['course_descrlong'], $row['prereqs'], $row['typ_offr'], $row['ctc_hrs']); if (!is_numeric($courseId)) { echo(" *** Error: Failed to update {$row['qtr']} {$row['subject']}-{$row['catalog_nbr']}\n"); echo(" "); From 89e152d05898f3e8946beef2d70cdc43611675f3 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Thu, 3 Sep 2026 20:25:05 -0400 Subject: [PATCH 05/27] I added the new column to the CREATE TABLE statement. --- schema/tables/courses.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/schema/tables/courses.sql b/schema/tables/courses.sql index 288af60..9c4371d 100644 --- a/schema/tables/courses.sql +++ b/schema/tables/courses.sql @@ -15,7 +15,10 @@ CREATE TABLE courses ( `course` VARCHAR(4) NOT NULL, `credits` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0, `title` VARCHAR(50) NOT NULL, - `description` TEXT NOT NULL + `description` TEXT NOT NULL, + `prerequisites` TEXT NOT NULL, + `typically_offered` TEXT NOT NULL, + `contact_hours` TEXT NOT NULL )ENGINE=InnoDb; -- INDEXING ---------------------------------------------------------------- From f87acfcc850f8f41d9ab579e8042918ccf8053d8 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Thu, 3 Sep 2026 20:55:01 -0400 Subject: [PATCH 06/27] Updated the insertOrUpdateCourse code. --- schema/migrationScripts/f_4charcourses.sql | 11 +++++++---- schema/procedures/InsertOrUpdateCourse.sql | 11 +++++++---- tools/Parser.php | 23 ++++++++++++---------- 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/schema/migrationScripts/f_4charcourses.sql b/schema/migrationScripts/f_4charcourses.sql index 047147b..429431e 100644 --- a/schema/migrationScripts/f_4charcourses.sql +++ b/schema/migrationScripts/f_4charcourses.sql @@ -19,7 +19,10 @@ CREATE PROCEDURE InsertOrUpdateCourse( IN p_course VARCHAR(4), IN p_credits INT, IN p_title VARCHAR(50), - IN p_description TEXT + IN p_description TEXT, + IN p_prerequisites TEXT, + IN p_typically_offered TEXT, + IN p_contact_hours TEXT, ) BEGIN -- Determine if the course already exists @@ -52,13 +55,13 @@ CREATE PROCEDURE InsertOrUpdateCourse( IF recordFound > 0 THEN -- Course exists, so update it UPDATE courses AS c - SET c.title = p_title, c.description = p_description, c.credits = p_credits + SET c.title = p_title, c.description = p_description, c.credits = p_credits, c.prerequisites = p_prerequisites, c.typically_offered = p_typically_offered, c.contact_hours = p_contact_hours WHERE c.department = v_department AND course = p_course AND quarter = p_quarter; SELECT "updated" AS action; ELSE -- Course doesn't exist, so insert it - INSERT INTO courses (quarter, department, course, title, description, credits) - VALUES(p_quarter, v_department, p_course, p_title, p_description, p_credits); + INSERT INTO courses (quarter, department, course, title, description, credits, prerequisites, typically_offered, contact_hours) + VALUES(p_quarter, v_department, p_course, p_title, p_description, p_credits, p_prerequisites, p_typically_offered, p_contact_hours); SELECT "inserted" AS action; END IF; diff --git a/schema/procedures/InsertOrUpdateCourse.sql b/schema/procedures/InsertOrUpdateCourse.sql index b9d78d5..82f4790 100644 --- a/schema/procedures/InsertOrUpdateCourse.sql +++ b/schema/procedures/InsertOrUpdateCourse.sql @@ -7,7 +7,10 @@ CREATE PROCEDURE InsertOrUpdateCourse( IN p_course VARCHAR(4), IN p_credits INT, IN p_title VARCHAR(50), - IN p_description TEXT + IN p_description TEXT, + IN p_prerequisites TEXT, + IN p_typically_offered TEXT, + IN p_contact_hours TEXT, ) BEGIN -- Determine if the course already exists @@ -40,13 +43,13 @@ BEGIN IF recordFound > 0 THEN -- Course exists, so update it UPDATE courses AS c - SET c.title = p_title, c.description = p_description, c.credits = p_credits + SET c.title = p_title, c.description = p_description, c.credits = p_credits, c.prerequisites = p_prerequisites, c.typically_offered = p_typically_offered, c.contact_hours = p_contact_hours WHERE c.department = v_department AND course = p_course AND quarter = p_quarter; SELECT "updated" AS action; ELSE -- Course doesn't exist, so insert it - INSERT INTO courses (quarter, department, course, title, description, credits) - VALUES(p_quarter, v_department, p_course, p_title, p_description, p_credits); + INSERT INTO courses (quarter, department, course, title, description, credits, prerequisites, typically_offered, contact_hours) + VALUES(p_quarter, v_department, p_course, p_title, p_description, p_credits, p_prerequisites, p_typically_offered, p_contact_hours); SELECT "inserted" AS action; END IF; diff --git a/tools/Parser.php b/tools/Parser.php index 8ac19b8..6602a13 100644 --- a/tools/Parser.php +++ b/tools/Parser.php @@ -86,28 +86,31 @@ function halt($messages) { /** * Inserts or updates a course. This function calls the stored procedure for * inserting or updating a course. - * @param $quarter int The term that the course is in - * @param $departCode string The code of the department - * @param $classCode string The code for the class - * @param $course string The number of the course - * @param $credits int The credits the course offers - * @param $title string The title of the course - * @param $description string The description for the course + * @param $quarter int The term that the course is in + * @param $departCode string The code of the department + * @param $classCode string The code for the class + * @param $course string The number of the course + * @param $credits int The credits the course offers + * @param $title string The title of the course + * @param $description string The description for the course + * @param $prerequisites string The prerequisites for the course + * @param $typicallyOffered string The typically offered semester for the course + * @param $contactHours string The contact hours for the course * @return mixed String of error message returned on failure. * Integer of course ID returned on success */ - function insertOrUpdateCourse(int $quarter, string $departCode, string $classCode, string $course, int $credits, string $title, string $description) { + function insertOrUpdateCourse(int $quarter, string $departCode, string $classCode, string $course, int $credits, string $title, string $description, string $prerequisites, string $typicallyOffered, string $contactHours) { global $coursesUpdated, $coursesAdded; // Call the stored proc // TODO: Refactor out department ID number (0000) - $query = "CALL InsertOrUpdateCourse({$quarter}, 0000, '{$classCode}', '{$course}', {$credits}, '{$title}', '{$description}')"; + $query = "CALL InsertOrUpdateCourse({$quarter}, 0000, '{$classCode}', '{$course}', {$credits}, '{$title}', '{$description}', '{$prerequisites}', '{$typicallyOffered}', '{$contactHours})"; $success = mysqli_multi_query($this->dbConn, $query); // Catch errors or return the id if (!$success) { // If the class code errors out, try the department code // TODO: Refactor out department ID number (0000) - $query = "CALL InsertOrUpdateCourse({$quarter}, 0000, '{$departCode}', '{$course}', {$credits}, '{$title}', '{$description}')"; + $query = "CALL InsertOrUpdateCourse({$quarter}, 0000, '{$departCode}', '{$course}', {$credits}, '{$title}', '{$description}', '{$prerequisites}', '{$typicallyOffered}', '{$contactHours})"; $success = mysqli_multi_query($this->dbConn, $query); if (!$success) { return mysqli_error($this->dbConn); From d3727524d2794f0d4a5bd8f1eae209f05947ed13 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Thu, 3 Sep 2026 20:57:08 -0400 Subject: [PATCH 07/27] Fixed syntax errors. --- schema/migrationScripts/f_4charcourses.sql | 2 +- schema/procedures/InsertOrUpdateCourse.sql | 2 +- tools/Parser.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/schema/migrationScripts/f_4charcourses.sql b/schema/migrationScripts/f_4charcourses.sql index 429431e..794b8bc 100644 --- a/schema/migrationScripts/f_4charcourses.sql +++ b/schema/migrationScripts/f_4charcourses.sql @@ -22,7 +22,7 @@ CREATE PROCEDURE InsertOrUpdateCourse( IN p_description TEXT, IN p_prerequisites TEXT, IN p_typically_offered TEXT, - IN p_contact_hours TEXT, + IN p_contact_hours TEXT ) BEGIN -- Determine if the course already exists diff --git a/schema/procedures/InsertOrUpdateCourse.sql b/schema/procedures/InsertOrUpdateCourse.sql index 82f4790..ff4c1ec 100644 --- a/schema/procedures/InsertOrUpdateCourse.sql +++ b/schema/procedures/InsertOrUpdateCourse.sql @@ -10,7 +10,7 @@ CREATE PROCEDURE InsertOrUpdateCourse( IN p_description TEXT, IN p_prerequisites TEXT, IN p_typically_offered TEXT, - IN p_contact_hours TEXT, + IN p_contact_hours TEXT ) BEGIN -- Determine if the course already exists diff --git a/tools/Parser.php b/tools/Parser.php index 6602a13..6ab3bb1 100644 --- a/tools/Parser.php +++ b/tools/Parser.php @@ -103,14 +103,14 @@ function insertOrUpdateCourse(int $quarter, string $departCode, string $classCod global $coursesUpdated, $coursesAdded; // Call the stored proc // TODO: Refactor out department ID number (0000) - $query = "CALL InsertOrUpdateCourse({$quarter}, 0000, '{$classCode}', '{$course}', {$credits}, '{$title}', '{$description}', '{$prerequisites}', '{$typicallyOffered}', '{$contactHours})"; + $query = "CALL InsertOrUpdateCourse({$quarter}, 0000, '{$classCode}', '{$course}', {$credits}, '{$title}', '{$description}', '{$prerequisites}', '{$typicallyOffered}', '{$contactHours}')"; $success = mysqli_multi_query($this->dbConn, $query); // Catch errors or return the id if (!$success) { // If the class code errors out, try the department code // TODO: Refactor out department ID number (0000) - $query = "CALL InsertOrUpdateCourse({$quarter}, 0000, '{$departCode}', '{$course}', {$credits}, '{$title}', '{$description}', '{$prerequisites}', '{$typicallyOffered}', '{$contactHours})"; + $query = "CALL InsertOrUpdateCourse({$quarter}, 0000, '{$departCode}', '{$course}', {$credits}, '{$title}', '{$description}', '{$prerequisites}', '{$typicallyOffered}', '{$contactHours}')"; $success = mysqli_multi_query($this->dbConn, $query); if (!$success) { return mysqli_error($this->dbConn); From dcf69107d3e4d918045cbbde8287b5eed61b214c Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Tue, 8 Sep 2026 21:14:00 -0400 Subject: [PATCH 08/27] Changing contact hours to float. --- schema/migrationScripts/f_4charcourses.sql | 2 +- schema/procedures/InsertOrUpdateCourse.sql | 2 +- schema/tables/courses.sql | 2 +- tools/Parser.php | 4 ++-- tools/processDump.php | 5 ++--- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/schema/migrationScripts/f_4charcourses.sql b/schema/migrationScripts/f_4charcourses.sql index 794b8bc..e9f9fe6 100644 --- a/schema/migrationScripts/f_4charcourses.sql +++ b/schema/migrationScripts/f_4charcourses.sql @@ -22,7 +22,7 @@ CREATE PROCEDURE InsertOrUpdateCourse( IN p_description TEXT, IN p_prerequisites TEXT, IN p_typically_offered TEXT, - IN p_contact_hours TEXT + IN p_contact_hours FLOAT ) BEGIN -- Determine if the course already exists diff --git a/schema/procedures/InsertOrUpdateCourse.sql b/schema/procedures/InsertOrUpdateCourse.sql index ff4c1ec..2d0ce9c 100644 --- a/schema/procedures/InsertOrUpdateCourse.sql +++ b/schema/procedures/InsertOrUpdateCourse.sql @@ -10,7 +10,7 @@ CREATE PROCEDURE InsertOrUpdateCourse( IN p_description TEXT, IN p_prerequisites TEXT, IN p_typically_offered TEXT, - IN p_contact_hours TEXT + IN p_contact_hours FLOAT ) BEGIN -- Determine if the course already exists diff --git a/schema/tables/courses.sql b/schema/tables/courses.sql index 9c4371d..d622575 100644 --- a/schema/tables/courses.sql +++ b/schema/tables/courses.sql @@ -18,7 +18,7 @@ CREATE TABLE courses ( `description` TEXT NOT NULL, `prerequisites` TEXT NOT NULL, `typically_offered` TEXT NOT NULL, - `contact_hours` TEXT NOT NULL + `contact_hours` FLOAT UNSIGNED NOT NULL )ENGINE=InnoDb; -- INDEXING ---------------------------------------------------------------- diff --git a/tools/Parser.php b/tools/Parser.php index 6ab3bb1..d62566b 100644 --- a/tools/Parser.php +++ b/tools/Parser.php @@ -95,11 +95,11 @@ function halt($messages) { * @param $description string The description for the course * @param $prerequisites string The prerequisites for the course * @param $typicallyOffered string The typically offered semester for the course - * @param $contactHours string The contact hours for the course + * @param $contactHours float The contact hours for the course * @return mixed String of error message returned on failure. * Integer of course ID returned on success */ - function insertOrUpdateCourse(int $quarter, string $departCode, string $classCode, string $course, int $credits, string $title, string $description, string $prerequisites, string $typicallyOffered, string $contactHours) { + function insertOrUpdateCourse(int $quarter, string $departCode, string $classCode, string $course, int $credits, string $title, string $description, string $prerequisites, string $typicallyOffered, float $contactHours) { global $coursesUpdated, $coursesAdded; // Call the stored proc // TODO: Refactor out department ID number (0000) diff --git a/tools/processDump.php b/tools/processDump.php index 405e7ab..b3d5071 100644 --- a/tools/processDump.php +++ b/tools/processDump.php @@ -104,7 +104,7 @@ `course_descrlong` text NOT NULL, `prereqs` text NOT NULL, `typ_offr` text NOT NULL, - `ctc_hrs` text NOT NULL, + `ctc_hrs` float NOT NULL, PRIMARY KEY (`crse_id`,`crse_offer_nbr`,`strm`,`session_code`,`class_section`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; ENE; @@ -302,11 +302,10 @@ $row['course_descrlong'] = mysqli_real_escape_string($dbConn, $row['course_descrlong']); $row['prereqs'] = mysqli_real_escape_string($dbConn, $row['prereqs']); $row['typ_offr'] = mysqli_real_escape_string($dbConn, $row['typ_offr']); - $row['ctc_hrs'] = mysqli_real_escape_string($dbConn, $row['ctc_hrs']); // Insert or update the course @$courseId = $parser->insertOrUpdateCourse($row['qtr'], $row['acad_org'], $row['subject'], $row['catalog_nbr'], - (int)$row['units'], $row['descr'], $row['course_descrlong'], $row['prereqs'], $row['typ_offr'], $row['ctc_hrs']); + (int)$row['units'], $row['descr'], $row['course_descrlong'], $row['prereqs'], $row['typ_offr'], (float)$row['ctc_hrs']); if (!is_numeric($courseId)) { echo(" *** Error: Failed to update {$row['qtr']} {$row['subject']}-{$row['catalog_nbr']}\n"); echo(" "); From 511cc3f1dc3a74aa109dff0438f5824a8be9db92 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Tue, 8 Sep 2026 21:30:32 -0400 Subject: [PATCH 09/27] I added a new script, but idk if I should have NOT NULL or not. --- schema/migrationScripts/course-extension.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 schema/migrationScripts/course-extension.sql diff --git a/schema/migrationScripts/course-extension.sql b/schema/migrationScripts/course-extension.sql new file mode 100644 index 0000000..3ae19d3 --- /dev/null +++ b/schema/migrationScripts/course-extension.sql @@ -0,0 +1,11 @@ +-- ------------------------------------------------------------------------- +-- Migration Script for course-extension +-- +-- @author Nathan Russo (nathanr@csh.rit.edu) +-- @descrip Migration script to add prerequisites, typically offered, and contact hours to the course table. +-- ------------------------------------------------------------------------- + +ALTER TABLE courses + ADD COLUMN prerequisites TEXT, + ADD COLUMN typically_offered TEXT, + ADD COLUMN contact_hours FLOAT UNSIGNED; From ebc680a21c057a6dd0d798fa9c3f31493db1f774 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Tue, 8 Sep 2026 23:54:45 -0400 Subject: [PATCH 10/27] I added defaults. --- schema/migrationScripts/course-extension.sql | 6 +++--- schema/tables/courses.sql | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/schema/migrationScripts/course-extension.sql b/schema/migrationScripts/course-extension.sql index 3ae19d3..aef4ea8 100644 --- a/schema/migrationScripts/course-extension.sql +++ b/schema/migrationScripts/course-extension.sql @@ -6,6 +6,6 @@ -- ------------------------------------------------------------------------- ALTER TABLE courses - ADD COLUMN prerequisites TEXT, - ADD COLUMN typically_offered TEXT, - ADD COLUMN contact_hours FLOAT UNSIGNED; + ADD COLUMN prerequisites TEXT NOT NULL DEFAULT '', + ADD COLUMN typically_offered TEXT NOT NULL DEFAULT '', + ADD COLUMN contact_hours FLOAT UNSIGNED NOT NULL DEFAULT 0; diff --git a/schema/tables/courses.sql b/schema/tables/courses.sql index d622575..26a500c 100644 --- a/schema/tables/courses.sql +++ b/schema/tables/courses.sql @@ -16,9 +16,9 @@ CREATE TABLE courses ( `credits` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0, `title` VARCHAR(50) NOT NULL, `description` TEXT NOT NULL, - `prerequisites` TEXT NOT NULL, - `typically_offered` TEXT NOT NULL, - `contact_hours` FLOAT UNSIGNED NOT NULL + `prerequisites` TEXT NOT NULL DEFAULT "", + `typically_offered` TEXT NOT NULL DEFAULT "", + `contact_hours` FLOAT UNSIGNED NOT NULL DEFAULT 0 )ENGINE=InnoDb; -- INDEXING ---------------------------------------------------------------- From 5dfc98ddad0774cb735bfc3c5315dbecc7400263 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Tue, 8 Sep 2026 23:56:01 -0400 Subject: [PATCH 11/27] I missed this file... --- schema/tables/courses.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schema/tables/courses.sql b/schema/tables/courses.sql index 26a500c..aa243b5 100644 --- a/schema/tables/courses.sql +++ b/schema/tables/courses.sql @@ -16,8 +16,8 @@ CREATE TABLE courses ( `credits` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0, `title` VARCHAR(50) NOT NULL, `description` TEXT NOT NULL, - `prerequisites` TEXT NOT NULL DEFAULT "", - `typically_offered` TEXT NOT NULL DEFAULT "", + `prerequisites` TEXT NOT NULL DEFAULT '', + `typically_offered` TEXT NOT NULL DEFAULT '', `contact_hours` FLOAT UNSIGNED NOT NULL DEFAULT 0 )ENGINE=InnoDb; From e9f6c7384c280acd79068f0d274a951ee7223095 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Wed, 9 Sep 2026 16:04:38 -0400 Subject: [PATCH 12/27] I was able to get ScheduleMaker to build. --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8fa94a8..b577484 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/node:12-buster-slim as builder +FROM docker.io/node:12-buster-slim AS builder LABEL author="Devin Matte " WORKDIR /usr/src/schedule @@ -14,7 +14,8 @@ RUN npm run-script build FROM docker.io/php:7.3-apache LABEL author="Devin Matte " -RUN echo "deb-src http://archive.debian.org/debian buster main" >> /etc/apt/sources.list +RUN sed -i '/security.debian.org\/debian-security/d' /etc/apt/sources.list && \ + echo "deb-src http://archive.debian.org/debian buster main" >> /etc/apt/sources.list RUN apt-get -yq update && \ apt-get -yq install \ From 92f701ecd4a143b5dd4b1f883cecae4ce1d83451 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Sat, 12 Sep 2026 00:01:17 -0400 Subject: [PATCH 13/27] Updated scripts and php. --- .gitignore | 1 + README.md | 2 +- schema/procedures/InsertOrUpdateCourse.sql | 4 ++-- schema/procedures/InsertOrUpdateSection.sql | 4 ++-- schema/tables/schools.sql | 3 +-- tools/Parser.php | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 32fe1db..8edd44c 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ web.config vwd.webinfo WebEssentials-Settings.json vendor +.vscode diff --git a/README.md b/README.md index 19b0eb1..2018dfc 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Available at [schedule.csh.rit.edu](https://schedule.csh.rit.edu) - If you wish to see images locally, you will also need S3 credentials, either supply your own or reach out. ### Run Locally -In order to run locally youre going to need [docker](https://www.docker.com/). +In order to run locally you're going to need [docker](https://www.docker.com/). ``` docker build -t schedulemaker . diff --git a/schema/procedures/InsertOrUpdateCourse.sql b/schema/procedures/InsertOrUpdateCourse.sql index 2d0ce9c..8a7f14a 100644 --- a/schema/procedures/InsertOrUpdateCourse.sql +++ b/schema/procedures/InsertOrUpdateCourse.sql @@ -45,12 +45,12 @@ BEGIN UPDATE courses AS c SET c.title = p_title, c.description = p_description, c.credits = p_credits, c.prerequisites = p_prerequisites, c.typically_offered = p_typically_offered, c.contact_hours = p_contact_hours WHERE c.department = v_department AND course = p_course AND quarter = p_quarter; - SELECT "updated" AS action; + SELECT 'updated' AS action; ELSE -- Course doesn't exist, so insert it INSERT INTO courses (quarter, department, course, title, description, credits, prerequisites, typically_offered, contact_hours) VALUES(p_quarter, v_department, p_course, p_title, p_description, p_credits, p_prerequisites, p_typically_offered, p_contact_hours); - SELECT "inserted" AS action; + SELECT 'inserted' AS action; END IF; -- Return the id of the course diff --git a/schema/procedures/InsertOrUpdateSection.sql b/schema/procedures/InsertOrUpdateSection.sql index 2fe4ddd..2114340 100644 --- a/schema/procedures/InsertOrUpdateSection.sql +++ b/schema/procedures/InsertOrUpdateSection.sql @@ -25,12 +25,12 @@ BEGIN maxenroll = p_maxenroll, curenroll = p_curenroll WHERE course = p_course AND section = p_section; - SELECT "updated" AS action; + SELECT 'updated' AS action; ELSE -- Section does not exist, so insert it INSERT INTO sections (course, section, title, instructor, type, status, maxenroll, curenroll) VALUES(p_course, p_section, p_title, p_instructor, p_type, p_status, p_maxenroll, p_curenroll); - SELECT "inserted" AS action; + SELECT 'inserted' AS action; END IF; -- Get the id of the section we just inserted or updated diff --git a/schema/tables/schools.sql b/schema/tables/schools.sql index 9ca4beb..1d331f7 100644 --- a/schema/tables/schools.sql +++ b/schema/tables/schools.sql @@ -11,8 +11,7 @@ CREATE TABLE IF NOT EXISTS `schools` ( `id` INT UNSIGNED NOT NULL PRIMARY KEY, `number` tinyint(2) UNSIGNED ZEROFILL NULL DEFAULT NULL, `code` VARCHAR(5) NULL DEFAULT NULL, - `title` varchar(30) NOT NULL, - PRIMARY KEY (`id`) + `title` varchar(30) NOT NULL ) ENGINE=InnoDb; -- ADD INDEXES ------------------------------------------------------------- diff --git a/tools/Parser.php b/tools/Parser.php index d62566b..a67eb59 100644 --- a/tools/Parser.php +++ b/tools/Parser.php @@ -103,14 +103,14 @@ function insertOrUpdateCourse(int $quarter, string $departCode, string $classCod global $coursesUpdated, $coursesAdded; // Call the stored proc // TODO: Refactor out department ID number (0000) - $query = "CALL InsertOrUpdateCourse({$quarter}, 0000, '{$classCode}', '{$course}', {$credits}, '{$title}', '{$description}', '{$prerequisites}', '{$typicallyOffered}', '{$contactHours}')"; + $query = "CALL InsertOrUpdateCourse({$quarter}, 0000, '{$classCode}', '{$course}', {$credits}, '{$title}', '{$description}', '{$prerequisites}', '{$typicallyOffered}', {$contactHours})"; $success = mysqli_multi_query($this->dbConn, $query); // Catch errors or return the id if (!$success) { // If the class code errors out, try the department code // TODO: Refactor out department ID number (0000) - $query = "CALL InsertOrUpdateCourse({$quarter}, 0000, '{$departCode}', '{$course}', {$credits}, '{$title}', '{$description}', '{$prerequisites}', '{$typicallyOffered}', '{$contactHours}')"; + $query = "CALL InsertOrUpdateCourse({$quarter}, 0000, '{$departCode}', '{$course}', {$credits}, '{$title}', '{$description}', '{$prerequisites}', '{$typicallyOffered}', {$contactHours})"; $success = mysqli_multi_query($this->dbConn, $query); if (!$success) { return mysqli_error($this->dbConn); From 0dabe67d9527e098359c11fb674c185516800788 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Sat, 12 Sep 2026 00:54:56 -0400 Subject: [PATCH 14/27] I fixed a bug with parsing. --- api/entity.php | 7 +++++-- tools/processDump.php | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/api/entity.php b/api/entity.php index 2c920f1..6c65549 100644 --- a/api/entity.php +++ b/api/entity.php @@ -40,7 +40,7 @@ } // Do the query - $query = "SELECT c.title, c.course, c.description, c.id, d.number, d.code + $query = "SELECT c.title, c.course, c.description, c.id, d.number, d.code, c.prerequisites, c.typically_offered, c.contact_hours FROM sections AS s JOIN courses AS c ON s.course = c.id JOIN departments AS d ON d.id = c.department @@ -62,7 +62,10 @@ "course" => $course['course'], "department" => ["code" => $course['code'], "number" => $course['number']], "title" => $course['title'], - "description" => htmlentities($course['description']) + "description" => htmlentities($course['description']), + "prerequisites" => $course['prerequisites'], + "typically_offered" => $course['typically_offered'], + "contact_hours" => $course['contact_hours'] ]; } diff --git a/tools/processDump.php b/tools/processDump.php index b3d5071..3b39c35 100644 --- a/tools/processDump.php +++ b/tools/processDump.php @@ -270,7 +270,7 @@ } $departmentsProc = mysqli_affected_rows($dbConn); // Grab each COURSE from the classes table -$courseQuery = "SELECT strm, subject, units, acad_org, catalog_nbr, descr, course_descrlong, prereqs, typ_offr, ctc_hrs"; +$courseQuery = "SELECT strm, subject, units, acad_org, catalog_nbr, descr, course_descrlong, prereqs, typ_offr, ctc_hrs, "; $courseQuery .= " crse_id, crse_offer_nbr, session_code"; $courseQuery .= " FROM classes WHERE strm < 20130 GROUP BY crse_id, strm, session_code"; $parser->debug("... Updating courses\n0%", false); From f24914068436eb7b70659770dd1536365fadbd9f Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Sat, 12 Sep 2026 10:17:21 -0400 Subject: [PATCH 15/27] Tested and added a bit more to my migration script. --- schema/migrationScripts/course-extension.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/schema/migrationScripts/course-extension.sql b/schema/migrationScripts/course-extension.sql index aef4ea8..1d5ed00 100644 --- a/schema/migrationScripts/course-extension.sql +++ b/schema/migrationScripts/course-extension.sql @@ -6,6 +6,6 @@ -- ------------------------------------------------------------------------- ALTER TABLE courses - ADD COLUMN prerequisites TEXT NOT NULL DEFAULT '', - ADD COLUMN typically_offered TEXT NOT NULL DEFAULT '', - ADD COLUMN contact_hours FLOAT UNSIGNED NOT NULL DEFAULT 0; + ADD COLUMN IF NOT EXISTS prerequisites TEXT NOT NULL DEFAULT '', + ADD COLUMN IF NOT EXISTS typically_offered TEXT NOT NULL DEFAULT '', + ADD COLUMN IF NOT EXISTS contact_hours FLOAT UNSIGNED NOT NULL DEFAULT 0; From 427288ba560fdb77fdc7be4c656f532fb6495ee1 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Mon, 14 Sep 2026 08:33:50 -0400 Subject: [PATCH 16/27] Undo changes on existing migrations. --- schema/migrationScripts/f_4charcourses.sql | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/schema/migrationScripts/f_4charcourses.sql b/schema/migrationScripts/f_4charcourses.sql index e9f9fe6..047147b 100644 --- a/schema/migrationScripts/f_4charcourses.sql +++ b/schema/migrationScripts/f_4charcourses.sql @@ -19,10 +19,7 @@ CREATE PROCEDURE InsertOrUpdateCourse( IN p_course VARCHAR(4), IN p_credits INT, IN p_title VARCHAR(50), - IN p_description TEXT, - IN p_prerequisites TEXT, - IN p_typically_offered TEXT, - IN p_contact_hours FLOAT + IN p_description TEXT ) BEGIN -- Determine if the course already exists @@ -55,13 +52,13 @@ CREATE PROCEDURE InsertOrUpdateCourse( IF recordFound > 0 THEN -- Course exists, so update it UPDATE courses AS c - SET c.title = p_title, c.description = p_description, c.credits = p_credits, c.prerequisites = p_prerequisites, c.typically_offered = p_typically_offered, c.contact_hours = p_contact_hours + SET c.title = p_title, c.description = p_description, c.credits = p_credits WHERE c.department = v_department AND course = p_course AND quarter = p_quarter; SELECT "updated" AS action; ELSE -- Course doesn't exist, so insert it - INSERT INTO courses (quarter, department, course, title, description, credits, prerequisites, typically_offered, contact_hours) - VALUES(p_quarter, v_department, p_course, p_title, p_description, p_credits, p_prerequisites, p_typically_offered, p_contact_hours); + INSERT INTO courses (quarter, department, course, title, description, credits) + VALUES(p_quarter, v_department, p_course, p_title, p_description, p_credits); SELECT "inserted" AS action; END IF; From 9d1f7cb8286617ee402811e9cb7ef9cb15872efe Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Mon, 14 Sep 2026 12:12:49 -0400 Subject: [PATCH 17/27] Added back a space. --- tools/processDump.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/processDump.php b/tools/processDump.php index 3b39c35..6ab7e68 100644 --- a/tools/processDump.php +++ b/tools/processDump.php @@ -269,6 +269,7 @@ $failures++; } $departmentsProc = mysqli_affected_rows($dbConn); + // Grab each COURSE from the classes table $courseQuery = "SELECT strm, subject, units, acad_org, catalog_nbr, descr, course_descrlong, prereqs, typ_offr, ctc_hrs, "; $courseQuery .= " crse_id, crse_offer_nbr, session_code"; From 5bba2cd99318b477dcec71f77f293b88c30a7600 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Mon, 5 Oct 2026 21:18:02 -0400 Subject: [PATCH 18/27] I added a new migration script. --- schema/migrationScripts/section-type-extension.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 schema/migrationScripts/section-type-extension.sql diff --git a/schema/migrationScripts/section-type-extension.sql b/schema/migrationScripts/section-type-extension.sql new file mode 100644 index 0000000..595ac2c --- /dev/null +++ b/schema/migrationScripts/section-type-extension.sql @@ -0,0 +1,11 @@ +-- ------------------------------------------------------------------------- +-- Migration Script for section-type-extension +-- +-- @author Nathan Russo (nathanr@csh.rit.edu) +-- @descrip Migration script to add 'OA' and 'OS' to the possible enum values for a section's type. +-- ------------------------------------------------------------------------- + + +ALTER TABLE sections MODIFY COLUMN type + ENUM('R', 'N', 'H', 'BL', 'OL', 'OA', 'OS') DEFAULT 'R' NOT NULL + COMMENT 'R=Regular, N=Night, H=Honors, BL=???, OL=Online, OA=Oline Async?, OS=Online Sync?'; From 79d3957fbdc218db10cf788db1a6f8b64c14a21c Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Mon, 5 Oct 2026 21:18:59 -0400 Subject: [PATCH 19/27] Removed space. --- schema/migrationScripts/section-type-extension.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/schema/migrationScripts/section-type-extension.sql b/schema/migrationScripts/section-type-extension.sql index 595ac2c..0e80a22 100644 --- a/schema/migrationScripts/section-type-extension.sql +++ b/schema/migrationScripts/section-type-extension.sql @@ -5,7 +5,6 @@ -- @descrip Migration script to add 'OA' and 'OS' to the possible enum values for a section's type. -- ------------------------------------------------------------------------- - ALTER TABLE sections MODIFY COLUMN type ENUM('R', 'N', 'H', 'BL', 'OL', 'OA', 'OS') DEFAULT 'R' NOT NULL COMMENT 'R=Regular, N=Night, H=Honors, BL=???, OL=Online, OA=Oline Async?, OS=Online Sync?'; From dbd5c0469aacb66dfe946850347de38ff26503e8 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Wed, 14 Oct 2026 16:50:41 -0400 Subject: [PATCH 20/27] I added a script to update the buildings. --- schema/migrationScripts/building-extension.sql | 12 ++++++++++++ schema/migrationScripts/section-type-extension.sql | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 schema/migrationScripts/building-extension.sql diff --git a/schema/migrationScripts/building-extension.sql b/schema/migrationScripts/building-extension.sql new file mode 100644 index 0000000..21d2467 --- /dev/null +++ b/schema/migrationScripts/building-extension.sql @@ -0,0 +1,12 @@ +-- ------------------------------------------------------------------------- +-- Migration Script for building-extension +-- +-- @author Nathan Russo (nathanr@csh.rit.edu) +-- @descrip Migration script to add '909', 'G', 'H', and 'TIRM' to the buildings table. +-- ------------------------------------------------------------------------- + +INSERT INTO buildings (number, code, name, off_campus) VALUES + ('909', '909', 'Annex IX', 0), + ('G', 'G', 'G DUBAI', 1), + ('H', 'H', 'H DUBAI', 1), + ('TRIM', 'TRIM', 'TIRANA', 1); diff --git a/schema/migrationScripts/section-type-extension.sql b/schema/migrationScripts/section-type-extension.sql index 0e80a22..051d442 100644 --- a/schema/migrationScripts/section-type-extension.sql +++ b/schema/migrationScripts/section-type-extension.sql @@ -6,5 +6,5 @@ -- ------------------------------------------------------------------------- ALTER TABLE sections MODIFY COLUMN type - ENUM('R', 'N', 'H', 'BL', 'OL', 'OA', 'OS') DEFAULT 'R' NOT NULL - COMMENT 'R=Regular, N=Night, H=Honors, BL=???, OL=Online, OA=Oline Async?, OS=Online Sync?'; + ENUM('R', 'N', 'H', 'BL', 'OL', 'OS', 'OA') DEFAULT 'R' NOT NULL + COMMENT 'R=Regular, N=Night, H=Honors, BL=Blended Learning, OL=Online, OS=Online - Synchronous, OA=Online - Asynchronous'; From 6c1065636f40cf67beb5b8d1a5b9015eb7d1952d Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Wed, 14 Oct 2026 20:44:34 -0400 Subject: [PATCH 21/27] Fixed typo. --- schema/migrationScripts/building-extension.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/migrationScripts/building-extension.sql b/schema/migrationScripts/building-extension.sql index 21d2467..7bc285c 100644 --- a/schema/migrationScripts/building-extension.sql +++ b/schema/migrationScripts/building-extension.sql @@ -9,4 +9,4 @@ INSERT INTO buildings (number, code, name, off_campus) VALUES ('909', '909', 'Annex IX', 0), ('G', 'G', 'G DUBAI', 1), ('H', 'H', 'H DUBAI', 1), - ('TRIM', 'TRIM', 'TIRANA', 1); + ('TIRM', 'TIRM', 'TIRANA', 1); From 94b4d499309c0d0cbf1c38a041264b80169e27d9 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Wed, 14 Oct 2026 21:25:50 -0400 Subject: [PATCH 22/27] I found another missing value. --- schema/migrationScripts/building-extension.sql | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/schema/migrationScripts/building-extension.sql b/schema/migrationScripts/building-extension.sql index 7bc285c..5024a54 100644 --- a/schema/migrationScripts/building-extension.sql +++ b/schema/migrationScripts/building-extension.sql @@ -2,11 +2,13 @@ -- Migration Script for building-extension -- -- @author Nathan Russo (nathanr@csh.rit.edu) --- @descrip Migration script to add '909', 'G', 'H', and 'TIRM' to the buildings table. +-- @descrip Migration script to add '909', 'G', 'H', 'TIRM', and 'TIRT' to +-- the buildings table. -- ------------------------------------------------------------------------- INSERT INTO buildings (number, code, name, off_campus) VALUES ('909', '909', 'Annex IX', 0), ('G', 'G', 'G DUBAI', 1), ('H', 'H', 'H DUBAI', 1), - ('TIRM', 'TIRM', 'TIRANA', 1); + ('TIRM', 'TIRM', 'TIRANA', 1), + ('TIRT', 'TIRT', 'TIRT', 1); From d161c23a3a4b54386773fdc28895bbd835ef2474 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Wed, 21 Oct 2026 14:49:45 -0400 Subject: [PATCH 23/27] Added more missing buildings. --- schema/migrationScripts/building-extension.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/schema/migrationScripts/building-extension.sql b/schema/migrationScripts/building-extension.sql index 5024a54..7f855cc 100644 --- a/schema/migrationScripts/building-extension.sql +++ b/schema/migrationScripts/building-extension.sql @@ -7,6 +7,9 @@ -- ------------------------------------------------------------------------- INSERT INTO buildings (number, code, name, off_campus) VALUES + ('083', '083', 'PAC', 0), + ('83', '83', 'PAC', 0), + ('820', '820', '820', 0), ('909', '909', 'Annex IX', 0), ('G', 'G', 'G DUBAI', 1), ('H', 'H', 'H DUBAI', 1), From ef0b12c53f15efde0730e9cd7aacf0b70af52824 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Wed, 21 Oct 2026 23:50:30 -0400 Subject: [PATCH 24/27] Updated PAC. --- schema/migrationScripts/building-extension.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/schema/migrationScripts/building-extension.sql b/schema/migrationScripts/building-extension.sql index 7f855cc..2f7470b 100644 --- a/schema/migrationScripts/building-extension.sql +++ b/schema/migrationScripts/building-extension.sql @@ -7,8 +7,7 @@ -- ------------------------------------------------------------------------- INSERT INTO buildings (number, code, name, off_campus) VALUES - ('083', '083', 'PAC', 0), - ('83', '83', 'PAC', 0), + ('83', 'PAC', 'Performing Arts Center', 0), ('820', '820', '820', 0), ('909', '909', 'Annex IX', 0), ('G', 'G', 'G DUBAI', 1), From 33d754b9122ea081aaf26ad717412cefb8f149d7 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Thu, 22 Oct 2026 01:51:20 -0400 Subject: [PATCH 25/27] Updated a tiny syntax error from the recent migration. --- schema/migrationScripts/building-extension.sql | 3 +-- tools/Parser.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/schema/migrationScripts/building-extension.sql b/schema/migrationScripts/building-extension.sql index 2f7470b..0df0b1a 100644 --- a/schema/migrationScripts/building-extension.sql +++ b/schema/migrationScripts/building-extension.sql @@ -2,8 +2,7 @@ -- Migration Script for building-extension -- -- @author Nathan Russo (nathanr@csh.rit.edu) --- @descrip Migration script to add '909', 'G', 'H', 'TIRM', and 'TIRT' to --- the buildings table. +-- @descrip Migration script to add missing buildings to the buildings table. -- ------------------------------------------------------------------------- INSERT INTO buildings (number, code, name, off_campus) VALUES diff --git a/tools/Parser.php b/tools/Parser.php index a67eb59..dfcb563 100644 --- a/tools/Parser.php +++ b/tools/Parser.php @@ -194,7 +194,7 @@ function getTempSections($courseNum, $offerNum, $term, $sessionNum) { return $list; } - function fileToTempTable(string $tableName, $file, $fields, $fileSize, string $procFunc = null) { + function fileToTempTable(string $tableName, $file, $fields, $fileSize, ?string $procFunc = null) { // Process the file $procBytes = 0; $outPercent = [0]; From 8f9f04eb144912b9d72b0ede91b21cd64a50bce1 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Thu, 22 Oct 2026 14:49:01 -0400 Subject: [PATCH 26/27] Updated multi query error handling for php 8.4. --- tools/Parser.php | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/tools/Parser.php b/tools/Parser.php index dfcb563..7cf2f34 100644 --- a/tools/Parser.php +++ b/tools/Parser.php @@ -104,16 +104,25 @@ function insertOrUpdateCourse(int $quarter, string $departCode, string $classCod // Call the stored proc // TODO: Refactor out department ID number (0000) $query = "CALL InsertOrUpdateCourse({$quarter}, 0000, '{$classCode}', '{$course}', {$credits}, '{$title}', '{$description}', '{$prerequisites}', '{$typicallyOffered}', {$contactHours})"; - $success = mysqli_multi_query($this->dbConn, $query); - // Catch errors or return the id + // Error check + try { + mysqli_multi_query($this->dbConn, $query); + $success = true; + } catch (\mysqli_sql_exception $e) { + $success = false; + } + + // Error check if (!$success) { // If the class code errors out, try the department code // TODO: Refactor out department ID number (0000) $query = "CALL InsertOrUpdateCourse({$quarter}, 0000, '{$departCode}', '{$course}', {$credits}, '{$title}', '{$description}', '{$prerequisites}', '{$typicallyOffered}', {$contactHours})"; - $success = mysqli_multi_query($this->dbConn, $query); - if (!$success) { - return mysqli_error($this->dbConn); + try { + mysqli_multi_query($this->dbConn, $query); + } catch (\mysqli_sql_exception $e) { + return $e->getMessage(); + //return mysqli_error($this->dbConn); } } @@ -147,8 +156,11 @@ function insertOrUpdateSection($courseId, $section, $title, $instructor, $type, $query .= "{$maxenroll},{$curenroll})"; // Error check - if (!mysqli_multi_query($this->dbConn, $query)) { - return mysqli_error($this->dbConn); + try { + mysqli_multi_query($this->dbConn, $query); + } catch (\mysqli_sql_exception $e) { + return $e->getMessage(); + //return mysqli_error($this->dbConn); } // First result is the action performed From cd3af469260128030ca89837f1a9fc6246a37bf0 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Fri, 23 Oct 2026 21:11:52 -0400 Subject: [PATCH 27/27] Updated docker version in processDump. --- processDump.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processDump.Dockerfile b/processDump.Dockerfile index 3d535c0..4735011 100644 --- a/processDump.Dockerfile +++ b/processDump.Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.4 +FROM docker.io/php:8.4-apache RUN docker-php-ext-install mysqli