|
|
|
@ -283,7 +283,7 @@ public class TeacherOpenCourseQuestionLogService extends CoreBaseService<Teacher
|
|
|
|
|
public void insertQuestionLog(@NotNull(message = "提交题目信息不能为空") QuestionLogAddDTO questionLogAddDTO) {
|
|
|
|
|
|
|
|
|
|
Long questionSettingId = questionLogAddDTO.getQuestionSettingId();
|
|
|
|
|
Map<String, TreeSet<String>> questionLogMap = questionLogAddDTO.getQuestionLogMap();
|
|
|
|
|
Map<String, String> questionLogMap = questionLogAddDTO.getQuestionLogMap();
|
|
|
|
|
|
|
|
|
|
// 查询学生身份
|
|
|
|
|
final Student student = getStudent();
|
|
|
|
@ -344,7 +344,7 @@ public class TeacherOpenCourseQuestionLogService extends CoreBaseService<Teacher
|
|
|
|
|
QuestionLogAddTypeEnum addType = questionLogAddDTO.getQuestionLogAddType();
|
|
|
|
|
Date addTime = questionLogAddDTO.getAddTime(); Long studentId = student.getStudentId();
|
|
|
|
|
Long questionSettingId = questionLogAddDTO.getQuestionSettingId();
|
|
|
|
|
Map<String, TreeSet<String>> questionLogMap = questionLogAddDTO.getQuestionLogMap();
|
|
|
|
|
Map<String, String> questionLogMap = questionLogAddDTO.getQuestionLogMap();
|
|
|
|
|
|
|
|
|
|
// 查询符合条件的日志表
|
|
|
|
|
String questionSnapshotIds = join(questionLogMap.keySet().toArray(), ",");
|
|
|
|
@ -371,7 +371,7 @@ public class TeacherOpenCourseQuestionLogService extends CoreBaseService<Teacher
|
|
|
|
|
}
|
|
|
|
|
Assert.isTrue(!questionLog.getQuestionLogAddType().equals(addType), "无法再次提交答案,题目已完成!");
|
|
|
|
|
// 学生提交的答案
|
|
|
|
|
String answersText = join(questionLogMap.get(questionLog.getResourcesQuestionSnapshotId()).toArray(), ",");
|
|
|
|
|
String answersText = join(questionLogMap.get(questionLog.getResourcesQuestionSnapshotId()), ",");
|
|
|
|
|
// 是否是正确答案
|
|
|
|
|
Boolean isCorrectAnswer = questionLog.getQuestionAnswer().equalsIgnoreCase(answersText);
|
|
|
|
|
// 完成时间
|
|
|
|
|