Skip to content

Add self check-in for events and workshops - #2801

Merged
mroderick merged 6 commits into
masterfrom
feature/self-check-in
Sep 1, 2026
Merged

Add self check-in for events and workshops#2801
mroderick merged 6 commits into
masterfrom
feature/self-check-in

Conversation

@mroderick

@mroderick mroderick commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

It is vitally important for codebar to keep accurate attendance records, here are some arguments why.

  • In case of trouble at or after an event, we need to have a record of who attended that we can share with the hosts or law enforcement
  • When we speak to sponsors and create our impact report, we need accurate data
  • When we ask students for feedback, we need to know who attended as a coach

The PR allows organisers to take some of the workload of keeping attendance and let's members check themselves in.

Hopefully, this will lead to better attendance keeping and less work for organisers during events and workshops.

What

Adds a self check-in flow for codebar events and workshops.

image image image

Admittedly, the PDF could be improved. I think this is OK for a first iteration and allows us to get it in the hands of organisers for a field test or two.

Changes

  • Stores a check_in_code on events/workshops and a source on invitations.
  • Adds a CheckInCode concern for code generation and window/capacity helpers.
  • Generates memorable check-in codes from the EFF long wordlist (7776 words); source documented in lib/words/README.md.
  • Adds an admin check-in page with a QR-code PDF download.
  • Adds a public check-in page where members sign in and select Student/Coach.
  • Enforces event-time window, capacity, waiting list, and single-role rules.
  • Records source for admin and check-in invitations.

Manual verification

  1. Make yourself an admin: Member.find_by(email: "you@example.com").add_role(:admin).
  2. Start the server and sign in.
  3. Open an upcoming event or workshop admin page and click Check in.
  4. Download the PDF and confirm it shows the event details, a QR code, and the check-in URL.
  5. Open the check-in URL in an incognito/private window (or sign out) and sign in as a different member.
  6. Select Student or Coach and submit.
  7. Return to the admin page and confirm the member appears as attended.
  8. Try checking in again with the same member and a different role — it should reject the role switch.
  9. Try checking in outside the event window (before 1 hour before start or after ends_at) — it should be blocked.

Testing

  • Full suite passes: 1247 examples, 0 failures.
  • RuboCop and haml-lint clean on changed files.

@mroderick
mroderick force-pushed the feature/self-check-in branch from e3a5cfd to 309a15f Compare August 9, 2026 18:54
@mroderick
mroderick marked this pull request as ready for review August 9, 2026 19:00
@KimberleyCook

Copy link
Copy Markdown
Contributor

This change is so so awesome! however in terms of reviewing the code I'm not sure I'm the best person 👀

@matyikriszta if you have some time would you be able to take a look?

@olleolleolle olleolleolle left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of things that I saw, nothing blocking,

  • the name parent, perhaps we can figure one out that's more intent-revealing?
  • the place where we picked between two routes (e/w for event and workshop), perhaps it could be just an if/else with concrete routes and not use public_send?
  • where we picked up check_in_code, assign a local and use it, that would fit the Ruby "omit hash value if key matches the name" Hash thing.

<3

Adds check_in_code to events and workshops, and source to invitations
and workshop_invitations, with regenerated schema.
Events and workshops generate a check-in code on create. Invitations
now record their source (admin, check-in, etc.) via shared constants.
Adds admin-only check-in instructions and a landscape QR-code PDF for
events and workshops. Includes the prawn/pdf dependencies, word list,
codebar logo asset, and route helpers.
Members can scan the QR code, sign in, select Student/Coach, and check
in. Enforces the event-time window, capacity, waiting list, and a
single role per member.
Rename `parent` to `check_in_target` throughout the check-in feature to
name the shared concept (Event or Workshop identified by check-in code).
Replace `public_send` in `CheckInCode#check_in_url` with concrete route
calls, use a local with Ruby hash shorthand in the controller path
helpers, and delete the `check_in_submit_path` duplicate of
`check_in_new_path`.
CheckInCode described the generated code, but the concern carries all
check-in behaviour on a host (code, URL, open window, spaces). Rename
to CheckInable to match the Invitable/Listable concern convention.
@mroderick
mroderick force-pushed the feature/self-check-in branch from 82eaa2e to 9f9ce6f Compare September 1, 2026 07:53
@mroderick
mroderick enabled auto-merge September 1, 2026 07:53
@mroderick
mroderick merged commit e2efccd into master Sep 1, 2026
8 of 9 checks passed
@mroderick
mroderick deleted the feature/self-check-in branch September 1, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants