RezinaLMS-Admin/src/lib/questionTypeDefinitionPracticeEditPath.ts
Yared Yemane 5df5a7f742 Integrate practice stimulus blocks, parent unlink, and question-type practice listing.
Add IELTS shared stimulus authoring, per-parent unlink APIs and UI, and fix question-type practice modal to show LMS/exam-prep locations and edit routes correctly.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 04:59:28 -07:00

14 lines
663 B
TypeScript

import { resolveExamPrepPracticeEditPath } from "./examPrepPracticeEditPath"
import { resolveLearnEnglishPracticeEditPath } from "./learnEnglishPracticeEditPath"
import type { QuestionTypeDefinitionPractice } from "../types/questionTypeDefinition.types"
/** Routes to the LMS or exam-prep practice editor based on `practice_kind`. */
export async function resolveQuestionTypeDefinitionPracticeEditPath(
practice: QuestionTypeDefinitionPractice,
): Promise<string | null> {
if ((practice.practice_kind || "LMS").toUpperCase() === "EXAM_PREP") {
return resolveExamPrepPracticeEditPath(practice)
}
return resolveLearnEnglishPracticeEditPath(practice)
}