deason 5 жил өмнө
parent
commit
66fa1c6c7a

+ 9 - 1
src/main/java/cn/com/qmth/dp/examcloud/oe/modules/export_exam_student_score/ExportExamStudentScore.java

@@ -288,7 +288,15 @@ public class ExportExamStudentScore {
                     } else {
                         curDynamicColumnValues.add(this.convertChar(question.getStudentAnswer()));
                     }
-                    curDynamicColumnValues.add(question.getStudentScore() != null ? question.getStudentScore().toString() : "0");
+
+                    // 注:客观题得分,目前只能通过比较作答答案是否一致来确定得分
+                    String correctAnswer = question.getCorrectAnswer() != null ? question.getCorrectAnswer() : "";
+                    String studentAnswer = question.getStudentAnswer() != null ? question.getStudentAnswer() : "";
+                    if (correctAnswer.equals(studentAnswer)) {
+                        curDynamicColumnValues.add(question.getQuestionScore() != null ? question.getQuestionScore().toString() : "0");
+                    } else {
+                        curDynamicColumnValues.add("0");
+                    }
                 } else {
                     curDynamicColumnValues.add(question.getStudentScore() != null ? question.getStudentScore().toString() : "0");
                 }

+ 10 - 0
src/main/java/cn/com/qmth/dp/examcloud/oe/modules/export_exam_student_score/vo/ExamQuestionVO.java

@@ -19,6 +19,8 @@ public class ExamQuestionVO implements Serializable {
 
     private Integer order;
 
+    private String correctAnswer;
+
     private String studentAnswer;
 
     private Double questionScore;
@@ -57,6 +59,14 @@ public class ExamQuestionVO implements Serializable {
         this.order = order;
     }
 
+    public String getCorrectAnswer() {
+        return correctAnswer;
+    }
+
+    public void setCorrectAnswer(String correctAnswer) {
+        this.correctAnswer = correctAnswer;
+    }
+
     public String getStudentAnswer() {
         return studentAnswer;
     }