Batch-load users and team members per page instead of N+1 lookups, and add server-side search on message, action, and resource fields.
Co-authored-by: Cursor <cursoragent@cursor.com>
Users without an active subscription now match Unsubscribed, covering pending payments and lapsed plans alongside never-subscribed learners.
Co-authored-by: Cursor <cursoragent@cursor.com>
Extend UserFilter and GetAllUsers so admins can segment platform users by profile, subscription, engagement, and device fields when building notification audiences.
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>
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>
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>
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>
Link checkout payments to a pending subscription row and activate it on success, or cancel it when payment fails, is cancelled, or expires.
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>
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>
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>
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>