Add course pages #29
Labels
No labels
bug
chore
data
feature
frontend
good first issue
intermediate
needs/docs
needs/research
needs/upstream
type/bug
type/external
type/feature
type/refactor
urgency
high
urgency
immediate
urgency
low
urgency
medium
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ScottyLabs/cal#29
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Give each course a page at
/courses/[number](for example/courses/15-122) that lists its lectures and recitations with meeting days, times, and rooms, plus an "Add to schedule" button.What you'll learn
The same full-stack pattern as org pages, working with scraped Schedule of Classes data.
Resources
Where to start
api/app/models/models.py:Coursehascourse_numberstored without a dash ("15122"),course_name,semesters, andorg_id. Each course is anOrganizationof typeCOURSEnamed like "15-122 Principles of Imperative Computation".api/scraper/transforms/soc_events.py: how sections are stored. OneEventper section (title "15122 A"), category LECTURE or RECITATION, and aRecurrenceRulewhoseby_dayholds the meeting days.GET /api/organizations/courses/<course_number>, marked@public, inapi/app/api/organizations.py. Strip the dash, look up theCourse, and return its sections fromEventjoined toRecurrenceRule, not from occurrences.web/src/app/courses/[number]/page.tsx: new page.web/src/app/components/ProfileSidebar.tsx,handleAddCourse: the existing add flow isaddOrgToSchedule(currentScheduleId, orgId)followed byuseUser().addOrganization(orgId). Reuse it.Done when
/courses/15-122and/courses/15122both work and show the course name and each section's days, times, and locationNotes
Ignore
GET /api/organizations/get_courses: it reads a JSON file that no longer exists (api/app/utils/course_data.pyis marked obsolete). If the user has no schedule, reuse the empty-state message from the sidebar.