|
|
|
@ -44,7 +44,8 @@ import java.util.stream.Collectors;
|
|
|
|
|
import static cn.hutool.core.text.CharSequenceUtil.join;
|
|
|
|
|
import static cn.jlw.util.CacheUserUtil.getStudent;
|
|
|
|
|
import static cn.jlw.util.QuestionUtil.shuffleQuestion;
|
|
|
|
|
import static com.ibeetl.jlw.enums.QuestionLogAddTypeEnum.*;
|
|
|
|
|
import static com.ibeetl.jlw.enums.QuestionLogAddTypeEnum.FINALLY_SUBMIT;
|
|
|
|
|
import static com.ibeetl.jlw.enums.QuestionLogAddTypeEnum.PRE_SUBMIT;
|
|
|
|
|
import static com.ibeetl.jlw.enums.ResourcesQuestionSnapshotFromTypeEnum.CHAPTER_EXERCISE;
|
|
|
|
|
import static com.ibeetl.jlw.enums.ResourcesQuestionSnapshotFromTypeEnum.HOMEWORK_FILE;
|
|
|
|
|
import static com.ibeetl.jlw.enums.TuckOrErrorEnum.ERROR_TEST;
|
|
|
|
@ -834,17 +835,7 @@ public class TeacherOpenCourseQuestionSettingService extends CoreBaseService<Tea
|
|
|
|
|
logQuery.setTeacherOpenCourseQuestionSettingId(questionSettingId);
|
|
|
|
|
List<TeacherOpenCourseQuestionLog> list = teacherOpenCourseQuestionLogService.getValuesByQueryNotWithPermission(logQuery);
|
|
|
|
|
|
|
|
|
|
list.forEach(item -> {
|
|
|
|
|
item.likeQuestionSnapshotInit();
|
|
|
|
|
if (TUCK_TEST.equals(tuckOrError)) {
|
|
|
|
|
item.setQuestionLogAddType(TUCK_TEST_INIT);
|
|
|
|
|
} else if(ERROR_TEST.equals(tuckOrError)) {
|
|
|
|
|
item.setQuestionLogAddType(ERROR_TEST_INIT);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(list)) {
|
|
|
|
|
teacherOpenCourseQuestionLogService.insertBatch(list);
|
|
|
|
|
return BeanUtil.copyToList(list, ResourcesQuestionSnapshot.class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|