feat: add interactive MCQ and code-sort exercise widgets to tutorial lessons

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-23 01:52:20 -06:00
parent 12cf247e20
commit 6331391792
10 changed files with 568 additions and 53 deletions

View File

@@ -2,6 +2,7 @@ import { DIFFICULTY } from "utils/constants"
import { getACRate } from "utils/functions"
import http from "utils/http"
import {
Exercise,
Problem,
Submission,
SubmissionListPayload,
@@ -420,3 +421,8 @@ export function getProblemSetUserProgress(
) {
return http.get(`problemset/${problemSetId}/users_progress`, { params })
}
export async function getExercises(tutorialId: number): Promise<Exercise[]> {
const res = await http.get("exercises", { params: { tutorial_id: tutorialId } })
return res.data
}