aboutsummaryrefslogtreecommitdiff
path: root/frontend/student.js (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-10-10*.html: s/IA Docs/IA/gRunxi Yu4-4/+4
2024-10-10auth.go: Set SameSite=StrictRunxi Yu1-1/+1
We use GET requests for some administration endpoints (most importantly, the ones managing the global state).
2024-10-10Implement course selection started/stopped statesRunxi Yu10-21/+135
Implements: https://todo.sr.ht/~runxiyu/cca/13
2024-10-10staff.html: Add search functionalityRunxi Yu1-0/+11
2024-10-10state.go: Cancel connections when setting state 0Runxi Yu1-8/+16
2024-10-10newcourses.go: setupCourses must be run after commitRunxi Yu1-10/+11
Otherwise it reads an old snapshot of the database...
2024-10-10wsc.go: Check newCtx.Done() when entering other event casesRunxi Yu1-12/+25
We select the context done channel when entering other cases too (see below) because we need to make sure the context cancel works even if both the cancel signal and another event arrive while processing a select cycle. It's a bit verbose and looks repetitive but is technically more correct than code without it.
2024-10-10wsh.go: Remove old TODO about limiting connections per userRunxi Yu1-7/+0
This has been implemented quite a while ago.
2024-10-10wsh.go: Remove TODO about checking pgErrRunxi Yu1-1/+0
If the UUIDs actually collide, we're doomed anyway. Okay... this isn't the best way to write software that must be ultra-reliable, but this doesn't need to be ultra-reliable.
2024-10-10export.go: Remove unnecessary TODORunxi Yu1-1/+1
2024-10-10auth.go: Remove access token expiration fields and related TODORunxi Yu1-14/+5
We're only using the token immediately after it is issued, so it's a bit unnecessary.
2024-10-10auth.go: Remove TODO about implementing nonce checksRunxi Yu1-7/+0
It's the OAuth provider that's responsible for checking this nonce.
2024-10-10auth.go: Remove TODO about using ON CONFLICTRunxi Yu1-7/+0
I think using the pgErr method actually makes the logic easier to follow especially since I'm not updating the "confirmed" field when UPDATEing but it's being initialized to false during INSERT.
2024-10-10Replace tcourse.sql with an example importable CSVRunxi Yu3-14/+15
2024-10-10Validate course group and course type when importing from CSVRunxi Yu1-0/+24
2024-10-10Allow staff to upload a CSV containing coursesRunxi Yu6-39/+432
Implements: https://todo.sr.ht/~runxiyu/cca/2
2024-10-10export.go: Remove unnecessary fields from user queryRunxi Yu1-3/+3
2024-10-10style.css: Fix file selector buttonsRunxi Yu1-1/+7
2024-10-09{wsp,wsx}.go: Move comment about RFC1459-like message formatRunxi Yu2-23/+23
2024-10-09auth.go, schema.sql: Add "confirmed" field to usersRunxi Yu2-2/+3
2024-10-09index.go, student_disabled.html: Repsect state = 0Runxi Yu3-17/+98
References: https://todo.sr.ht/~runxiyu/cca/13
2024-10-09*.go, schema.sql, staff.html: Implement state settingRunxi Yu7-3/+187
References: https://todo.sr.ht/~runxiyu/cca/13
2024-10-09*.go, tmpl/staff.html: Allow staff to export choicesRunxi Yu6-2/+250
Implements: https://todo.sr.ht/~runxiyu/cca/3
2024-10-09staff.html: Update from students.html and only display link to /exportRunxi Yu1-112/+5
2024-10-09docs/fields.txt: RemoveRunxi Yu1-27/+0
2024-10-09{courses,wsc}.go: Atomic 64-bit alignmentRunxi Yu2-4/+7
2024-10-09wsc.go: Use sync.Map for cancelPool to reduce lock contentionRunxi Yu1-21/+10
2024-10-09student.html: Use separate columns for Selected and MaxRunxi Yu1-2/+9
2024-10-09eslint.sh: Call eslint directly rather than through npxRunxi Yu1-1/+1
2024-10-09*.go: Update commentsRunxi Yu8-30/+17
2024-10-09bench.go: Update number of coursesRunxi Yu1-1/+1
2024-10-09student.js: Don't N then Y the same course on selectv0.1.8Runxi Yu1-1/+1
2024-10-09student.{html,js}: Deselect courses in the same group when selectingRunxi Yu2-5/+7
2024-10-09student.html: Slightly better looks around tickboxRunxi Yu1-8/+10
2024-10-09tcourse.sql: Add more example CCAsRunxi Yu1-5/+13
2024-10-09{courses,index}.go, student.html, style.css: Group by course groupRunxi Yu4-20/+34
2024-10-09student.html: Simplify JSRunxi Yu1-2/+1
2024-10-09index.go, {login,student}.html: Use structs rather than maps for tmplRunxi Yu3-22/+28
2024-10-09*.go: Use sync.Map instead of map[int]*courseT for coursesRunxi Yu6-73/+115
I'm not sure whether this is actually better than locking.
2024-10-09{courses,wsc,wsp}.go: Usems should be sync.MapRunxi Yu3-19/+12
This is a classic few-reads, many-writes situation where a sync.Map would lead to substantially less lock contention.
2024-10-08{courses,wsc,wsm}.go: map[courseGroupT](bool->struct{})Runxi Yu3-8/+8
This makes it use slightly less memory. Approximately courseGroupT bits per connection!
2024-10-08style.css: Work around Firefox bug 217769Runxi Yu1-0/+8
Firefox eats the left, bottom, and right borders when tbody is empty. This is a bug known for 21 years (that was Firefox 37 or something). References: https://bugzilla.mozilla.org/show_bug.cgi?id=217769
2024-10-08*.go: Further wrap errorsRunxi Yu6-24/+52
2024-10-08err.go: Create, and unify some error definitionsRunxi Yu5-38/+55
2024-10-07Revert "latexify-source.sh: \subsection{\texttt{%s}}"Runxi Yu1-11/+11
This reverts commit a9916b3a7df327836f18011edcbf8cc218260f89.
2024-10-07student.js: Use "let" rather than "var"v0.1.7Runxi Yu1-2/+2
2024-10-07latexify-source.sh: Don't set -xRunxi Yu1-1/+1
2024-10-07cca.scfg.example: usem_delay_shift_bits should default to 5Runxi Yu1-1/+1
2024-10-07Reapply "{config,wsc}.go, cca.scfg.example: Dynamic course update delay"Runxi Yu3-17/+34
This reverts commit 831040c3d7dbc116a25848786bc5ab83fef6149b.
2024-10-07Revert "{config,wsc}.go, cca.scfg.example: Dynamic course update delay"Runxi Yu3-34/+17
This reverts commit de3f0b9e7003e4521f5ea866134e77ff859ab99b.