| | |
| | | ExamPaperQuestionCustomerAnswer examPaperQuestionCustomerAnswer = new ExamPaperQuestionCustomerAnswer(); |
| | | examPaperQuestionCustomerAnswer.setQuestionId(question.getId()); |
| | | examPaperQuestionCustomerAnswer.setExamPaperId(examPaper.getId()); |
| | | examPaperQuestionCustomerAnswer.setQuestionScore(question.getScore()); |
| | | examPaperQuestionCustomerAnswer.setQuestionScore(null); |
| | | examPaperQuestionCustomerAnswer.setSubjectId(examPaper.getSubjectId()); |
| | | examPaperQuestionCustomerAnswer.setItemOrder(itemOrder); |
| | | examPaperQuestionCustomerAnswer.setCreateTime(now); |
| | |
| | | case TrueFalse: |
| | | examPaperQuestionCustomerAnswer.setAnswer(customerQuestionAnswer.getContent()); |
| | | examPaperQuestionCustomerAnswer.setDoRight(question.getCorrect().equals(customerQuestionAnswer.getContent())); |
| | | examPaperQuestionCustomerAnswer.setCustomerScore(examPaperQuestionCustomerAnswer.getDoRight() ? question.getScore() : 0); |
| | | examPaperQuestionCustomerAnswer.setCustomerScore(examPaperQuestionCustomerAnswer.getDoRight() ? null : 0); |
| | | break; |
| | | case MultipleChoice: |
| | | String customerAnswer = ExamUtil.contentToString(customerQuestionAnswer.getContentArray()); |
| | | examPaperQuestionCustomerAnswer.setAnswer(customerAnswer); |
| | | examPaperQuestionCustomerAnswer.setDoRight(customerAnswer.equals(question.getCorrect())); |
| | | examPaperQuestionCustomerAnswer.setCustomerScore(examPaperQuestionCustomerAnswer.getDoRight() ? question.getScore() : 0); |
| | | examPaperQuestionCustomerAnswer.setCustomerScore(examPaperQuestionCustomerAnswer.getDoRight() ? null : 0); |
| | | break; |
| | | case GapFilling: |
| | | String correctAnswer = JsonUtil.toJsonStr(customerQuestionAnswer.getContentArray()); |