Record complimentary admin payment rows for audit, cancel only open payments so paid revenue stays intact, and exclude ADMIN_GRANT/ADMIN_EXTEND from revenue analytics.
Co-authored-by: Cursor <cursoragent@cursor.com>
Omit limit/offset on exam-prep practice list endpoints to fetch the full set instead of defaulting to limit=20.
Co-authored-by: Cursor <cursoragent@cursor.com>
Learners get email/SMS OTP codes via /user/sendResetCode; team members get reset links via new /team/sendResetCode and /team/resetPassword APIs, with admin panel integration docs.
Co-authored-by: Cursor <cursoragent@cursor.com>
The practices-by-question-type endpoint only exposed exam_prep_lesson_id, so catalog course and unit links appeared unlinked in the admin panel. Now returns exam_prep_parents for all exam-prep parent kinds.
Co-authored-by: Cursor <cursoragent@cursor.com>
Adds DELETE /practices/:id/parents/:parentKind/:parentId and exam-prep equivalent so admins can remove one location link without replacing the full parents array. Includes admin panel integration guide and parent kind parse tests.
Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce practice_stimulus_blocks, authoring_profile, and stimulus_block_key on question set items. Full practice GET/PUT returns merged effective_dynamic_payload for admin authoring.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add streaming CSV export for payments, users, subscriptions, activity logs, and team members with list-filter parity, RBAC permissions, and admin panel documentation.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add POST/GET /exam-prep/practices and PUT .../parents mirroring the LMS shell-then-link flow. Update admin panel integration guide and exam_prep.practices.list permission.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use email-based ON CONFLICT to refresh bcrypt hash when the account pre-exists, and repair null or invalid passwords for the Reach for Change seed user.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add tsegaye.negera@reachforchange.org as an OPEN_LEARNER in initial seed data for customer-login testing.
Co-authored-by: Cursor <cursoragent@cursor.com>
Mirror LMS precedence locking for students across catalog courses, units, modules, lessons, and practices, including handler enforcement on practice consumption routes.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add associated_question_id on question set items so authors can group practice questions into ordered sections. Expose prerequisite_question_ids on read APIs for client-side gating, validate associations on save, and document admin panel integration.
Co-authored-by: Cursor <cursoragent@cursor.com>
Include all active FCM device tokens (including web), return devices_targeted in bulk push responses, and refresh platform on token re-register. Document email template integration and push troubleshooting in the bulk notifications guide.
Co-authored-by: Cursor <cursoragent@cursor.com>
Enable template selection on admin single/bulk and scheduled emails, send welcome emails only after email registration OTP verification, and use the password_reset template for email-based reset links.
Co-authored-by: Cursor <cursoragent@cursor.com>
Expose GET /admin/users/:user_id/subscriptions with full plan history and payments, and GET /admin/users/:user_id/learning-activity with LMS and exam-prep progress, completions, and recent timeline.
Co-authored-by: Cursor <cursoragent@cursor.com>
Let team members update their own profile without admin routes, seed team.profile.update_mine RBAC, and add FAQ/personas/ratings admin integration guides.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add PUT /api/v1/modules/:moduleId/lessons/reorder with lessons.reorder permission, matching the existing modules and exam-prep lesson reorder patterns.
Co-authored-by: Cursor <cursoragent@cursor.com>
Extend DRAFT/PUBLISHED to programs, courses, modules, and exam-prep hierarchy entities with learner visibility gating and progress exclusion. Resolve question_type_definition_id in question responses for legacy system types and unlinked dynamic questions.
Co-authored-by: Cursor <cursoragent@cursor.com>
Reject creating a second practice on the same course, module, or lesson with 409 Conflict, and enforce the rule in the database via unique partial indexes.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add a configurable cron worker to bulk-mark PENDING payments past expires_at as EXPIRED. Also remove obsolete integration docs and refresh Swagger/go.mod artifacts.
Co-authored-by: Cursor <cursoragent@cursor.com>
Map legacy runtime types like AUDIO to catalog keys (e.g. audio_conversation_type) so the endpoint matches type-definitions API output.
Co-authored-by: Cursor <cursoragent@cursor.com>
Returns distinct question_type values with per-type counts so clients can resolve types from question_set_id without loading full questions.
Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve the immediate predecessor by sort_order (and id) instead of requiring sort_order - 1, so learners cannot skip locked programs, courses, or modules when ordering numbers are non-consecutive.
Co-authored-by: Cursor <cursoragent@cursor.com>
Expose GET /api/v1/admin/payments for filtered gateway transaction listing, constrain /admin/:id to integers so /admin/payments is not mistaken for an admin id, and grant payments.list_all to ADMIN.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use explicit SQL casts and named sqlc args to avoid PostgreSQL 42P08 ambiguity during nonce/session status updates, and align repository bindings with regenerated sqlc types.
Co-authored-by: Cursor <cursoragent@cursor.com>
Set question_set creation fallback status to PUBLISHED and add a migration that publishes existing draft/inactive sets while updating the database default status for future records.
Co-authored-by: Cursor <cursoragent@cursor.com>
Expose practices to learner roles based on practice shell publish state and include per-practice access fields derived from linked question set readiness so clients can manage completion/access UX explicitly.
Co-authored-by: Cursor <cursoragent@cursor.com>
Require question_sets.status to be PUBLISHED for learner-visible practices and reject completion for non-published practice sets so learner progress reflects only publish-ready content.
Co-authored-by: Cursor <cursoragent@cursor.com>