@@ -22,9 +22,10 @@ export const apiAddAdminExamQuestion = (examId, payload) =>
|
||||
export const apiAddAdminQuestionOption = (questionId, payload) =>
|
||||
http.post(buildUrl(endpoints.addQuestionOption, { questionId }), payload)
|
||||
|
||||
// Mock-only — backend has no /exams/:id/participants endpoint yet.
|
||||
export const apiGetAdminExamParticipants = (examId, params) =>
|
||||
http.get(buildUrl(endpoints.getExamParticipants, { examId }), { params })
|
||||
// GET /exams/:examId/attempts — paginated list, each row is one attempt with
|
||||
// the attempting user embedded (multiple rows per user possible).
|
||||
export const apiGetAdminExamAttempts = (examId, params) =>
|
||||
http.get(buildUrl(endpoints.getExamAttempts, { examId }), { params })
|
||||
|
||||
export const apiShowAdminExamParticipant = (examId, participantId) =>
|
||||
http.get(buildUrl(endpoints.showExamParticipant, { examId, participantId }))
|
||||
|
||||
@@ -122,8 +122,10 @@ export const endpoints = {
|
||||
// Sessions — attendance roster
|
||||
getSessionsAttendance: '/admin/sessions/:sessionId/attendances',
|
||||
|
||||
// Exams — participants only (backend has /exams/:id but no participants endpoints)
|
||||
getExamParticipants: '/admin/exams/:examId/participants',
|
||||
// Exams — admin/teacher view of attempts. Each row is one attempt with the
|
||||
// attempting user embedded; multiple rows per user are possible. The
|
||||
// single-attempt detail endpoint is still mock-only.
|
||||
getExamAttempts: '/exams/:examId/attempts',
|
||||
showExamParticipant: '/admin/exams/:examId/participants/:participantId',
|
||||
|
||||
// Homeworks — list, show, submissions list, show submission
|
||||
|
||||
Reference in New Issue
Block a user