Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shifting to tag-based functionality for registration questions & attendance/check-in #1157

Merged
merged 10 commits into from
Aug 25, 2023

Conversation

danielamassiceti
Copy link
Collaborator

@danielamassiceti danielamassiceti commented Aug 24, 2023

Included in this PR:

  • A change in the way answers to registration questions are extracted and attached to an AttendanceUser. Previously a user's answers were extracted by searching for specific question strings (e.g. 'Are you bringing a poster?'). This PR instead adds functionality for answers to be extracted by a tag attached to a question. Specifically, for a given user, all the registration questions that have been tagged by an admin (functionality to do this is not included in this PR, though a new tag_type = QUESTION has been added) are pulled from the dataset, and then their corresponding answers are extracted.
  • Added a new RegistrationQuestionTag model
  • Removed accommodation award, tshirt and poster fields from attendance, in place of a registration_metadata and offer_metadata fields which are lists of dicts containing relevant info. registration_metadaset contains name/response pairs for all the registration questions which had tags and the user's corresponding answers. offer_metadata just extracts the names of the tags attaches to the user's offer.
  • The front-end check-in functionality then simply loops through the registration_metadata, and displays it. Currently, the offer_metadata is not shown though can easily be added.
  • Shifted some tag stringify functionality to the TagAPI class (from the OfferAPI class), so it can be used more broadly
  • Some small bug and comment fixes

I have tested this very briefly. Will continue testing over the next days.

api/app/tags/api.py Outdated Show resolved Hide resolved
Copy link
Contributor

@avishkar58 avishkar58 left a comment

Choose a reason for hiding this comment

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

This looks great! Always a pleasure to read your code! :))
Will wait until you've added the tests to approve.

@danielamassiceti
Copy link
Collaborator Author

Completed some more systematic testing and all looks good. Adding the scenarios I tested here for our records:
--industry prof with accepted offer, registered, not paid, not signed online indemnity form -- can't be checked in due to no payment
--industry prof with accepted offer, registered, not paid, signed online indemnity form -- can't be checked in due to no payment
--industry prof with accepted offer, registered, paid, not signed online indemnity form -- PASSED
--industry prof with accepted offer, registered, paid, signed online indemnity form -- PASSED
--phd with accepted offer, not registered, not paid, not signed online indemnity form -- PASSED; can be checked in (even if they haven't paid) since they haven't registered
--phd with accepted offer, not registered, not paid, signed online indemnity form -- PASSED; can be checked in (even if they haven't paid) since they haven't registered

--invited guest, not registered, not paid, not signed online indemnity form -- PASSED; payment not required for invited guests
--invited guest, not registered, not paid, signed online indemnity form -- PASSED; payment not required for invited guests
--invited guest, registered, not paid, not signed online indemnity form -- PASSED; payment not required for invited guests
--invited guest, registered, not paid, signed online indemnity form -- PASSED; payment not required for invited guests

--invited guest with offer, not registered, not paid, not signed online indemnity form -- PASSED, payment not required for invited guests
--invited guest with offer, not registered, not paid, signed online indemnity form -- PASSED, payment not required for invited guests
--invited guest with offer, attendeee-registered, not paid, not signed online indemnity form -- PASSED, payment not required for invited guests
--invited guest with offer, attendee-registered, not paid, signed online indemnity form -- PASSED, payment not required for invited guests
--inivted guest with offer, guest-registered, not paid, not signed online indemnity form -- PASSED
--inivted guest with offer, guest-registered, not paid, signed online indemnity form -- PASSED

@danielamassiceti
Copy link
Collaborator Author

Noting that we only check the 'confirmed' field in a user's registration entry to determine if they have paid or not. If they have not registered and not paid, then they can still be checked in.

We've left this as-is for Indaba 2023, as all attendees have registered, but I have logged a bug here for future events.

@danielamassiceti danielamassiceti merged commit bbba7a2 into develop Aug 25, 2023
@danielamassiceti danielamassiceti deleted the attendance-updates branch August 25, 2023 01:22
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.

2 participants