Add CONTENT_MANAGER RBAC defaults, migration, and Super Admin-only team email invitations; restrict assignable team_member roles without changing platform user roles.
Co-authored-by: Cursor <cursoragent@cursor.com>
Return 409 with a clear message instead of a foreign-key 500 when a plan is still referenced by user subscriptions.
Co-authored-by: Cursor <cursoragent@cursor.com>
Admin Inactive filter can return pending, deactivated, suspended, and any other non-active statuses in one query.
Co-authored-by: Cursor <cursoragent@cursor.com>
Recover SUCCESS/FAILED outcomes from Chapa when webhooks were missed, then expire any rows still pending.
Co-authored-by: Cursor <cursoragent@cursor.com>
Also replace question options on update so placement grading stays consistent with admin edits, and tune the Postgres pool defaults.
Co-authored-by: Cursor <cursoragent@cursor.com>
Learners submit answers to one published placement set; the API scores auto-gradable questions, maps percent to CEFR, and updates knowledge_level.
Co-authored-by: Cursor <cursoragent@cursor.com>
Return a clear allowed-values message for oneof tags so issue status updates no longer surface empty field errors.
Co-authored-by: Cursor <cursoragent@cursor.com>
Extend the analytics dashboard with live subscription snapshots, renewal/resubscribe metrics, and field-options normalization so Unknown and invalid profile values aggregate as Other. Also include exam_prep in the learner progress summary.
Co-authored-by: Cursor <cursoragent@cursor.com>
Enforce account status on email, phone OTP, social login, token refresh, and authenticated learner requests.
Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve real LMS practice IDs and return stimulus blocks, block links, and additive effective dynamic payloads for paginated practice questions.
Co-authored-by: Cursor <cursoragent@cursor.com>
Harden LMS and exam-prep gates so only STUDENT is enforced, and return FREE effective_access_tier for OPEN_LEARNER so clients do not show paywall locks.
Co-authored-by: Cursor <cursoragent@cursor.com>
User profile and single-user endpoints now return active_subscriptions with plan category alongside subscription_status.
Co-authored-by: Cursor <cursoragent@cursor.com>
GET /subscriptions/me now returns every active subscription with plan category. PREP_TIME and ANSWER_TIMER dynamic slots are normalized to { seconds: N } on save.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use one user-scoped extend endpoint that grants or renews by plan_id, charge admin payments at plan price for revenue, and refresh the admin panel integration guide.
Co-authored-by: Cursor <cursoragent@cursor.com>
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>
Synthesize dynamic_payload from flat legacy fields on outbound API responses so AUDIO, MCQ, and SHORT_ANSWER questions match DYNAMIC question structure.
Co-authored-by: Cursor <cursoragent@cursor.com>
Presign minio:// references on outbound /api/v1 JSON so clients get usable URLs from resource GETs without calling the refresh endpoint.
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>
Prevent handler panics from dropping connections as nginx 502s and surface export DB errors as JSON 500 responses with CORS headers.
Co-authored-by: Cursor <cursoragent@cursor.com>
Build the full CSV in memory before sending so nginx and browsers receive a Content-Length response instead of a truncated chunked stream.
Co-authored-by: Cursor <cursoragent@cursor.com>
Stop pinning AllowHeaders to a fixed list so browsers can send Accept and other fetch headers on export requests without failing OPTIONS preflight.
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>
Allow bulk in-app and email sends to target team_member_ids and team_role alongside platform users, including scheduled dispatch. Document team refresh token admin integration and select-missing-words sequence order.
Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve actor name, role, and id from resource_id when historical auth and team member logs lack stored actor fields, and backfill enriched values in API responses.
Co-authored-by: Cursor <cursoragent@cursor.com>
Record explicit actor on login/register flows and return actor_name, actor_email, and actor_kind from activity log APIs so admin audit rows no longer show System for authenticated events.
Co-authored-by: Cursor <cursoragent@cursor.com>