import fetch from '@/utils/fetch'

/**
 * 【查】分页查询人工判卷考卷及信息
 * {currentPage,pageSize,classifyId,isPractive,title}
 */
export const pagingGradePaperApi = (params) =>
  fetch({ url: '/assessmentEvaluation/StudentOnlineExam/pagingGrade', method: 'get', params })

/**
 * 修改是否为匿名评卷
 * @param {object} param0 试卷id+是否匿名
 * @returns
 */
export const patchIsAnonymousApi = ({ id, ...data }) =>
  fetch({ url: '/assessmentEvaluation/exam/updateIsAnonymous/' + id, method: 'patch', data })
/**
 * 人工判卷考试的学员考试查询 分页
 * @param {object} param0 试卷id+是否匿名
 * @returns
 */
export const pagingGradeDetailsApi = ({ id, ...params }) =>
  fetch({ url: '/assessmentEvaluation/StudentOnlineExam/pagingGradeDetails/' + id, method: 'get', params })
/**
 * 传入修改数组，修改题目result相关字段
 * @param {Array} data
 * @returns
 */
export const patchSomeExamResult = (histroyId, data) =>
  fetch({ url: '/assessmentEvaluation/OnlineExamHistory/result/' + histroyId, method: 'patch', data })
