Skip to content

. Add DELETE /api/v1/admin/courses/:id/modules/:moduleId with cascade #329

Description

@DeFiVC

What: Ensure that deleting a course module also cleans up associated quizzes and submissions.

Why: When an admin removes a module from a course, orphaned quiz records and submissions remain in the database, causing data inconsistency.

Scope: In the module deletion logic, delete all quizzes for the module and their submissions. Use database transaction to ensure atomicity. Log the cleanup action.

Acceptance criteria:

  • Deleting a module removes associated quizzes
  • Submissions for deleted quizzes are removed
  • Operation is atomic (all or nothing)
  • Cleanup is logged in audit logs

Technical context: src/database/schema.ts:88-109 — quizzes table. src/database/schema.ts:113-142 — quizSubmissions.


Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions