Repository navigation
Serve every bCourses course from one site, with seating's routes - #22
Merged
Merged
Conversation
One deployment now serves every course, as seating and sections do: a landing page at /, your courses at /offerings, importing a course at /offerings/new, and each course's queue and API at /offerings/<bCourses course id>/. Sign-in moves to /login/, /authorized/ and /logout/. New offerings table maps a bCourses course to the key on every row; courses from the per-course sites are linked to their old key with `flask link-offering`. New account table holds the signed-in person and their roles in every bCourses course, fetched once at sign-in; inside a course it resolves to that course's existing user row, made on first visit. No existing rows change. The admin setting that only lets students on the roster in is now enforced, logout is a POST, and COURSE_KEY and CANVAS_COURSE_ID are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #22 +/- ##
==========================================
+ Coverage 67.76% 72.66% +4.90%
==========================================
Files 8 10 +2
Lines 1185 1394 +209
Branches 173 198 +25
==========================================
+ Hits 803 1013 +210
+ Misses 324 323 -1
Partials 58 58 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…etting A course's queue is now only open to its bCourses staff and students (and members of the admin override course), as in sections, so the only_registered_students setting isn't needed. The migration removes it from every course and puts it back, off, on downgrade. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Refuse a sign-in clearly when the bCourses profile has no email, instead of failing to save the account. - Show a message, not an error, when someone else imports the same course at the same time. - Save and sign in accounts in one helper, shared by bCourses sign-in and the development login. - Look up an offering by Canvas ID in one place, which skips IDs too big for the column. - Remove a template branch copied from sections for a page oh-queue doesn't have. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-out visitors used to get every active ticket as the queue lists it: question, assignment, location, times and helper. Now they get no tickets, only how many have each status, which the page uses for the tab counts and the wait estimate, with a prompt to sign in to see the queue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 21, 2026
- Hiding an offering marks it hidden instead of deleting its row, so importing the course again brings it back under the same key. Before, a course linked to an old key (like cs61a) came back empty, its data still under the old key. - When the course API refuses an open page (no longer enrolled) or the course is gone (hidden), reload the page if it fails too, so it shows why instead of seeming offline. - Build course paths with url_for, and share the term month and newest-first order between the offerings and import pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
People not enrolled in a course, or opening a hidden or unknown one, got Werkzeug's bare error page, which told them to log out but had no way to (logging out is a POST). Errors now use the site's page, as in sections: the reason and a button back to the site, where the navbar can log out. Course API errors are JSON with the message. Also make the README's link-offering command match its other commands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
One oh-queue deployment now serves every bCourses course, as seating and sections do, with the same routes. This follows sections' #14.
/offeringswhen you're signed in///offerings/offerings/offerings/new/offerings/new/offerings/<canvas id>/…/offerings/<canvas id>/…(the queue and its API)/login/,/authorized/,/logout//oauth/canvas_login,/oauth/canvas_authorized,/oauth/logoutThe landing, offerings, import and development-login pages reuse sections' templates and its vendored Bootstrap 5 (
oh_queue/templates/pages,oh_queue/static/pages). The queue itself looks the same.Data model. The migration only adds tables; no existing rows change.
offeringstable (Offering, as in seating and sections). It maps a bCourses course to the key stored in every row'scoursecolumn.cs61a, …) and are linked withpython manage.py link-offering <canvas id> <key> "<name>". A linked course gets its Canvas name, code and start date the first time a member opens/offerings.accounttable: the signed-in person and their role in every bCourses course, fetched in one call at sign-in.userrow, which is created on the first visit. Its staff status follows the account's roles.userrows stay per course, because call links, heartbeat and staff status are per course here.Other changes
cs61a. (Sections deletes the row, which strands a linked course's data: Hiding a linked offering strands its data sections#101.)/debug, which only worked with a single course and returned an empty page.COURSE_KEYandCANVAS_COURSE_IDare no longer used.Not changed here: sign-ins are still remembered with the roles from the last sign-in. Sections now expires them after 12 hours; that belongs with the security work in #2.
Before deploying
/authorized/to the Canvas developer key's redirect URIs; the callback moved from/oauth/canvas_authorizedCOURSE_KEYandCANVAS_COURSE_IDfrom the deployment's settingspython manage.py link-offering <bCourses id> <key> "<name>"Test plan
offeringscolumnlink-offering, and the migration both wayshiddendefault), and on SQLite🤖 Generated with Claude Code