decided to add season support
This commit is contained in:
@@ -27,6 +27,16 @@ export enum Status {
|
||||
CANCELLED = 'CANCELLED',
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a semester, with the year and the season for when a course is offered
|
||||
*/
|
||||
export type Semester = {
|
||||
/** The year that the semester is in */
|
||||
year: number;
|
||||
/** The season that the semester is in (Fall, Spring, Summer) */
|
||||
season: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* The internal representation of a course for the extension
|
||||
*/
|
||||
@@ -59,6 +69,8 @@ export class Course {
|
||||
flags: string[];
|
||||
/** How is the class being taught (online, hybrid, in person, etc) */
|
||||
instructionMode: InstructionMode;
|
||||
/** Which semester is the course from */
|
||||
semester: Semester;
|
||||
|
||||
constructor(course: Course | Serialized<Course>) {
|
||||
Object.assign(this, course);
|
||||
|
||||
@@ -60,8 +60,18 @@ export class CourseScraper {
|
||||
fullName = fullName.replace(/\s\s+/g, ' ').trim();
|
||||
|
||||
const [courseName, department, number] = this.separateCourseName(fullName);
|
||||
|
||||
const [status, isReserved] = this.getStatus(row);
|
||||
|
||||
// TODO: get semester from somewhere
|
||||
const year = new Date().getFullYear();
|
||||
const month = new Date().getMonth();
|
||||
let season = 'Fall';
|
||||
if (month >= 0 && month < 5) {
|
||||
season = 'Spring';
|
||||
} else if (month >= 5 && month < 8) {
|
||||
season = 'Summer';
|
||||
}
|
||||
|
||||
const newCourse = new Course({
|
||||
fullName,
|
||||
courseName,
|
||||
@@ -77,6 +87,11 @@ export class CourseScraper {
|
||||
instructionMode: this.getInstructionMode(row),
|
||||
instructors: this.getInstructors(row),
|
||||
description: this.getDescription(document),
|
||||
// TODO: get semester from somewhere
|
||||
semester: {
|
||||
year,
|
||||
season,
|
||||
},
|
||||
});
|
||||
courses.push({
|
||||
rowElement: row,
|
||||
|
||||
71
todo.md
Normal file
71
todo.md
Normal file
@@ -0,0 +1,71 @@
|
||||
# To Do
|
||||
|
||||
Last Updated: 03/4/2023
|
||||
|
||||
## Features:
|
||||
- [ ] scraping course information
|
||||
- [ ] auto loading next pages
|
||||
- [ ] injecting plus header and buttons
|
||||
- [ ] showing course popup
|
||||
- [ ] RMP, eCis, Textbook, and Syllabus buttons
|
||||
- [ ] displaying professor information on popup
|
||||
- [ ] saving courses
|
||||
- [ ] Multiple schedule support
|
||||
- [ ] Browser Action Popup
|
||||
- [ ] browser action badge
|
||||
- [ ] links to RIS, Registrar, Degree Audit in browser action
|
||||
- [ ] copy unique id quickly from browser action
|
||||
- [ ] Clickable links to buildings
|
||||
- [ ] Count how many hours and # of classes in schedule
|
||||
- [ ] Conflict highlighting
|
||||
- [ ] Tooltip that says which classes conflict, maybe suggest a different section or time that doesn't conflict
|
||||
- [ ] import / export schedules from JSON file
|
||||
- [ ] Search for classes from within extension
|
||||
- [ ] Grade distribution
|
||||
- [ ] Course description
|
||||
- [ ] Highlight and use rich text to make course description more readable
|
||||
- [ ] auto load
|
||||
- [ ] calendar
|
||||
- [ ] calendar file export
|
||||
- [ ] save as png
|
||||
- [ ] calendar click to open course popup
|
||||
- [ ] calendar switch schedule
|
||||
- [ ] User Options
|
||||
- [ ] UTPlanner support? (not as much of a priority anymore)
|
||||
- [ ] Waitlist support
|
||||
- [ ] import classes from waitlist page
|
||||
- [ ] waitlist pooling
|
||||
- [ ] store in db
|
||||
- [ ] see who else is looking at certain classes (waitlist, or has it in their schedule)
|
||||
- [ ] CHECK ALL THE TODOs in CODE BEFORE LAUNCHING
|
||||
|
||||
|
||||
## LEGACY FROM UTRP-V1
|
||||
- [ ] unneeded Logout message on individual course pages
|
||||
- [ ] RMP not working on individual course pages
|
||||
- [ ] Textbook button (amber)
|
||||
- [ ] Calendar popup
|
||||
- [ ] online classes no times in popup link
|
||||
- [ ] load all courses on first pages
|
||||
- [ ] Location in popup e tra info
|
||||
- [ ] E port calendar format
|
||||
- [ ] import courses from class schedule screen
|
||||
- [ ] all semester's grade distribution
|
||||
- [ ] import into and e port from UT registration plus
|
||||
- [ ] Showing the icon on the flags pages
|
||||
- [ ] Easter egg, no course messages
|
||||
- [ ] clean upcalendar e port and add more options to screen
|
||||
- [ ] search by unique number
|
||||
- [ ] the update/install bug
|
||||
- [ ] Redesign footer menu
|
||||
- [ ] work on UT Planner & Coursicle
|
||||
- [ ] work on multiple schedules
|
||||
- [ ] polish
|
||||
- [ ] more 'at a glance info'
|
||||
- [ ] Rearrange Courses
|
||||
- [ ] Firefo Support
|
||||
- [ ] RMP (cumulative score for class based off CIS, RMP, grade dist., etc.)
|
||||
- [ ] Conflict indicator ( Possible different section? )
|
||||
- [ ] Compare classes mode
|
||||
- [ ] Screenshotting calendar on zoomed browser cuts off image.
|
||||
|
||||
Reference in New Issue
Block a user