feat: education
Deploy banu-front / deploy (push) Failing after 6s

This commit is contained in:
sajjadtalkhabi
2026-06-11 21:09:12 +03:30
parent 020a47f735
commit 4011c2f83b
18 changed files with 558 additions and 35 deletions
+5
View File
@@ -29,3 +29,8 @@ export const apiGetAdminExamAttempts = (examId, params) =>
export const apiShowAdminExamParticipant = (examId, participantId) =>
http.get(buildUrl(endpoints.showExamParticipant, { examId, participantId }))
// GET /exam-attempts/:id — full per-attempt review: scoring, the user, the
// term/course/session context, and every question with all options carrying
// isCorrect (answer key) and isSelected (what this user picked).
export const apiShowAdminExamAttempt = (id) => http.get(buildUrl(endpoints.showExamAttempt, { id }))
+5
View File
@@ -30,6 +30,10 @@ export const endpoints = {
// dedicated student route (returns the membership row with the nested term).
getStudentTerms: '/student/my-terms',
showStudentTerm: '/student/my-terms/:id',
getStudentExamResults: '/student/exam-results',
getStudentHomeworks: '/student/homeworks',
showHomework: '/homeworks/:id',
startExam: '/exams/:examId/start',
getMissionaryProfile: '/student/missionary/profile',
getMissionaryRequests: '/student/missionary/requests',
@@ -127,6 +131,7 @@ export const endpoints = {
// attempting user embedded; multiple rows per user are possible. The
// single-attempt detail endpoint is still mock-only.
getExamAttempts: '/exams/:examId/attempts',
showExamAttempt: '/exam-attempts/:id',
showExamParticipant: '/admin/exams/:examId/participants/:participantId',
// Homeworks — list, show, submissions list, show submission
+8
View File
@@ -5,5 +5,13 @@ export const apiGetStudentExams = (params) => http.get(endpoints.getStudentExams
export const apiShowStudentExam = (id) => http.get(buildUrl(endpoints.showExam, { id }))
// POST /exams/:examId/start — begins (or resumes) an attempt; returns the
// attempt with startedAt + deadlineAt. Idempotent on the backend.
export const apiStartStudentExam = (id) => http.post(buildUrl(endpoints.startExam, { examId: id }))
export const apiSubmitStudentExamAttempt = (id, payload) =>
http.post(buildUrl(endpoints.submitExam, { examId: id }), payload)
// GET /student/exam-results — paginated attempts across the student's exams.
export const apiGetStudentExamResults = (params) =>
http.get(endpoints.getStudentExamResults, { params })
+9
View File
@@ -0,0 +1,9 @@
import { http } from '@/services/api/http'
import { buildUrl, endpoints } from '@/services/api/endpoints'
// GET /student/homeworks — active homeworks for sessions in the student's
// enrolled terms; filterable by term_id / course_id / session_id.
export const apiGetStudentHomeworks = (params) =>
http.get(endpoints.getStudentHomeworks, { params })
export const apiShowStudentHomework = (id) => http.get(buildUrl(endpoints.showHomework, { id }))