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>
14 lines
663 B
TypeScript
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)
|
|
}
|