Commit Graph

656 Commits

Author SHA1 Message Date
c5347f5b6f fix: allow ANSWER_TIMER-only question type definitions
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-19 03:55:37 -07:00
ef5858851a feat: allow empty stimulus and response on question type definitions
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-19 03:37:08 -07:00
8b6c6ea17f feat: add global GET /api/v1/practices list endpoint
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-19 01:48:06 -07:00
12d4e49cea feat: optional parents on practice create and PUT parents endpoint
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-18 05:02:13 -07:00
e67f666815 feat: allow LMS practices to link to multiple course/module/lesson parents
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-18 04:14:34 -07:00
bc8d36b46f feat: list practices globally by question type definition
Add GET /questions/type-definitions/:id/practices to return paginated LMS and exam-prep practices whose question sets contain matching questions, including legacy question_type fallback for mapped definitions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-18 03:48:40 -07:00
8dd0c2d784 feat: add question associations for practice section sequencing
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>
2026-06-18 03:18:24 -07:00
c66a7be28f fix: surface FCM bulk push delivery failures
Return per-token Firebase errors and project ID in bulk push responses, log actionable hints, and only deactivate truly expired tokens.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 01:53:52 -07:00
7d436e3e5d fix: replace all user device tokens on register
Deactivate existing devices before registering a new token so each user keeps only one active FCM device.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 01:44:04 -07:00
9b3f494669 fix: resolve role-based bulk notification user targeting
GetAllUsers with unset PageSize was issuing LIMIT 0, so role-only bulk sends returned no recipients. Default to 100k for unpaginated lookups and normalize role/status case.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 06:57:33 -07:00
c73d2880ef fix: improve bulk push token targeting and update notifications docs
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>
2026-06-15 06:18:42 -07:00
7836a9f95d feat: wire email templates for outbound, welcome, and password reset flows
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>
2026-06-15 05:17:01 -07:00
b57b306372 feat: add MinIO presigned direct upload endpoints
Add POST /files/presign-upload and /files/complete-upload so clients can PUT files directly to MinIO with upload progress tracking.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-14 05:07:59 -07:00
d3b9cbf204 feat: add admin user subscriptions and learning activity endpoints
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>
2026-06-14 04:33:46 -07:00
f3fa551be4 feat: add PUT /team/me self-service profile update and admin docs
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>
2026-06-14 03:46:22 -07:00
10babe06f6 feat: add in-app notification delete APIs and fix FAQ RBAC access
- Add DELETE /notifications/:id and POST /notifications/delete-in-app for owned in-app rows

- Seed FAQ permissions for ADMIN/INSTRUCTOR, migration 000084, and improve RBAC sync

- Document FAQ admin panel integration

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-14 02:15:00 -07:00
7e327440fc feat: add scheduled bulk in-app notifications and integration guide
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 04:57:03 -07:00
0e31a08903 feat: add GET /practices/:id/full for practice with question set and questions
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 02:15:37 -07:00
c9f4a9c428 feat: auto-assign and return display_order for question set items
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 01:38:27 -07:00
8409f69d56 feat: return premium catalog content on GET for client-side lock UI
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 01:14:04 -07:00
a4792206f7 fix: use two-phase bump when shifting sort_order on content insert
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 05:26:17 -07:00
a704c3b29f fix: avoid sort_order collisions when inserting content at a specific position
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 05:20:12 -07:00
4f873fe9de chore: temporarily disable exam-prep subscription enforcement
Add ExamPrepSubscriptionGateDisabled so learners can access exam-prep content without an IELTS or Duolingo plan. LMS subscription gating is unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 04:44:18 -07:00
c9a4bc1306 free/premium feature 2026-06-10 04:23:47 -07:00
26cf7d2908 feat: scope subscriptions by content type and make Duolingo plans lifetime
LEARN_ENGLISH plans unlock LMS only; IELTS and DUOLINGO unlock matching exam-prep catalog courses. Enable category subscription gating, restrict programs to Learn English, and treat Duolingo subscriptions as non-expiring one-time purchases.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 03:59:26 -07:00
58790f0998 fix: avoid unique sort_order conflicts during LMS hierarchy reorder
Bump sort_order before reassignment for programs, courses, and modules so batch reorder no longer violates uq_courses_program_sort and sibling constraints.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 03:42:40 -07:00
dfdb2a52dc feat: add LMS lesson reorder endpoint within a module
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>
2026-06-10 03:28:13 -07:00
e56bea3abf feat: add hierarchy publish status and resolve question type definition IDs
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>
2026-06-10 02:40:16 -07:00
5c6cb1b8d3 feat: send in-app and push learner notifications for key milestones
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 05:11:16 -07:00
ad4c739722 fix: omit payment_url from admin payments list response
Use a list-specific DTO so GET /api/v1/admin/payments no longer exposes checkout URLs while get-by-id is unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 04:33:14 -07:00
8dd1d40a16 feat: limit Learn English parents to one LMS practice each
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>
2026-06-09 04:28:14 -07:00
b780db5307 feat: expire stale pending payments with background worker
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>
2026-06-09 04:10:17 -07:00
be7946955d fix: show exam-prep catalog courses to learners when subscription gate is disabled
Align catalog list filtering with middleware so student/open-learner tokens return courses instead of an empty list while category subscription enforcement is bypassed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 00:51:15 -07:00
22464479ae feat: add full practice update endpoints for LMS and exam prep
PUT /practices/:id/full and PUT /exam-prep/practices/:id/full sync practice shell, question set settings, and questions in one request.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 02:43:34 -07:00
55df6b8b0b fix: allow audio-only dynamic questions without text stimulus
DYNAMIC question create no longer requires QUESTION_TEXT, INSTRUCTION, or TEXT_PASSAGE in dynamic_payload; validation follows the type definition only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 02:20:11 -07:00
685e1d104f feat: add GET notification by ID endpoint
Expose read-only in-app notification details at GET /notifications/:id with owner scoping and list-all admin access.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 05:31:46 -07:00
bb03ee1668 feat: paginate question type definitions list API
Add limit and offset query params to GET /questions/type-definitions with total_count metadata. Update integration docs, Postman collection, and page clamping tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 04:33:41 -07:00
b5b9ef03b5 refactor: consolidate stimulus audio under AUDIO_PROMPT
Remove AUDIO_CLIP from the stimulus component catalog and use AUDIO_PROMPT for all question-side audio. Update integration, practice, and Postman docs accordingly.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 03:34:01 -07:00
ab986a08f0 feat: expand builder docs, add practice LMS guide, remove CHART stimulus kinds
Document schema slot label assignment and usage in the admin integration guide. Add a step-by-step dynamic practice creation guide for course/module/lesson scopes. Remove CHART and FLOW_CHART from the stimulus component catalog.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 02:54:44 -07:00
33355a4b23 feat: PDF_ATTACHMENT stimulus, dynamic question_text rules, admin builder docs
Add PDF_ATTACHMENT stimulus kind and MinIO pdf upload (media_type=pdf) for question-side PDFs.

Reject top-level question_text on DYNAMIC create/update; omit it from API responses and derive stored text from stimulus only.

Expand DYNAMIC_QUESTION_TYPE_BUILDER_ADMIN_INTEGRATION.md with full API request/response reference and workflows.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 11:07:02 -07:00
08a2886654 feat: optional dynamic question_text and OPEN_LEARNER completed access
Derive question_text from QUESTION_TEXT, INSTRUCTION, or TEXT_PASSAGE stimulus for DYNAMIC questions so the top-level field is no longer required on create.

OPEN_LEARNER access responses now set is_accessible and is_completed to true on all LMS and exam-prep content, with full progress when totals exist.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 09:48:33 -07:00
2605877f12 Resolve question-set question-types to builder definitions.
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>
2026-06-02 06:46:54 -07:00
a75700ffaa Add GET question-sets question-types endpoint for practice sets.
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>
2026-06-02 06:35:46 -07:00
256183ae64 Align learner progress rollups with practice-scoped lesson counts.
Count only children that have published practices at module and above for LMS and exam prep; keep lesson at 100% after one practice and module at 100% after direct module practice.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-02 02:56:12 -07:00
a83745fd93 Fix Chapa verify JSON parsing when amount is numeric.
Accept string or number for amount in verify and webhook payloads so GET /payments/verify can complete successfully.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-02 02:27:13 -07:00
632371c3d0 apple sign in 2026-06-01 01:02:28 -07:00
fbad083ca4 Add admin payments list API with filters and fix /admin route conflict.
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>
2026-05-29 05:50:46 -07:00
6423bb261e Sanitize Chapa checkout customization text for initialize API.
Strip disallowed characters from customization title and description so subscription payments pass Chapa validation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-29 04:38:55 -07:00
d3bbd8c95a Add backend Chapa payment success HTML page.
Serve /payment/success and /api/v1/payments/chapa/success to verify tx_ref on redirect and activate subscriptions, and share the payment success template with ArifPay.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-29 04:29:05 -07:00
038df4e3db Normalize ArifPay checkout payment URLs before returning.
Clean malformed provider paths (such as /checkout//{session_id}) so subscribe responses persist and return stable payment_url values.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-28 03:25:41 -07:00