|
@@ -2,7 +2,6 @@ package cn.com.qmth.examcloud.core.oe.student.api.controller;
|
|
|
|
|
|
import cn.com.qmth.examcloud.api.commons.security.bean.User;
|
|
|
import cn.com.qmth.examcloud.commons.exception.StatusException;
|
|
|
-import cn.com.qmth.examcloud.commons.util.JsonUtil;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.base.utils.Check;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.bean.ExamStudentQuestionInfo;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.service.ExamRecordQuestionsService;
|
|
@@ -93,23 +92,11 @@ public class ExamQuestionController extends ControllerSupport {
|
|
|
*/
|
|
|
@ApiOperation(value = "考试过程中-考生作答:更新试题作答信息(包括提交试题答案,更新是否标记)")
|
|
|
@PostMapping("/submitQuestionAnswer")
|
|
|
- public void submitQuestionAnswer(@RequestBody List<ExamStudentQuestionInfo> examQuestionInfos,
|
|
|
- HttpServletRequest request) {
|
|
|
- if (LOGGER.isDebugEnabled()) {
|
|
|
- String strJosn = JsonUtil.toJson(examQuestionInfos);
|
|
|
- LOGGER.debug("ExamQuestionController--submitQuestionAnswer参数信息:" + strJosn);
|
|
|
- }
|
|
|
+ public void submitQuestionAnswer(@RequestBody List<ExamStudentQuestionInfo> examQuestionInfos, HttpServletRequest request) {
|
|
|
User user = getAccessUser();
|
|
|
- if (examQuestionInfos != null && examQuestionInfos.size() > 0) {
|
|
|
- for (ExamStudentQuestionInfo examStudentQuestionInfo : examQuestionInfos) {
|
|
|
- if (examStudentQuestionInfo.getOrder() == null) {
|
|
|
- throw new StatusException("2001", "illegal params");
|
|
|
- }
|
|
|
- }
|
|
|
- String referer = request.getHeader("REFERER");
|
|
|
- String agent = request.getHeader("USER-AGENT");
|
|
|
- examRecordQuestionsService.submitQuestionAnswer(user.getUserId(), examQuestionInfos, referer, agent);
|
|
|
- }
|
|
|
+ String referer = request.getHeader("REFERER");
|
|
|
+ String agent = request.getHeader("USER-AGENT");
|
|
|
+ examRecordQuestionsService.submitQuestionAnswer(user.getUserId(), examQuestionInfos, referer, agent);
|
|
|
}
|
|
|
|
|
|
}
|