Implements #5: studio admin / instructors author intake questions scoped
per offering; answers are stored against a lesson or group enrolment via a
polymorphic registration reference.
- src/Registration/: Question + Answer value objects, QuestionRepository
and AnswerRepository, QuestionEndpoint (REST), QuestionController +
templates/admin/questions.php (Offerings -> Questions submenu)
- us_questions and us_question_answers tables in Schema.php
- REST: public GET /offerings/{id}/questions; POST/PATCH/DELETE /questions
gated by manage_questions + offering ownership (owner or studio admin)
- Field types text/textarea/select/checkbox; select options stored as JSON
- Wiring in Plugin, RestRegistrar, AdminMenu
AnswerRepository is built now and consumed by the booking/enrolment flow
in #3/#4.
Tests: tests/Unit/Registration/ (19 tests). composer test (63 total), cs,
and PHPStan level 6 all pass.
Refs #5
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Implements #5 (Registration Questions). Builds on the Offerings foundation (#1).
What's included
src/Registration/domain —Question+Answervalue objects,QuestionRepository+AnswerRepository,QuestionEndpoint(REST),QuestionController+templates/admin/questions.phpSchema.php—us_questionsandus_question_answers(polymorphicregistration_type/registration_id, shared with policies later)text/textarea/select/checkbox;selectoptions stored as JSONPlugin,RestRegistrar,AdminMenuREST API
/offerings/{id}/questions/questionsmanage_questions+ offering owner/studio-admin/questions/{id}manage_questions+ offering owner/studio-admin/questions/{id}manage_questions+ offering owner/studio-adminNotes
AnswerRepository(insert/insertMany/findByRegistration) is built here and will be consumed by the booking/enrolment flow in #3/#4.Tests
tests/Unit/Registration/— Question, Answer, QuestionRepository, AnswerRepository (19 tests)composer test(63 total),composer cs, and PHPStan level 6 all passRefs #5
🤖 Generated with Claude Code