|
|
|
@ -78,6 +78,85 @@ public class TeacherOpenCourseQuestionLogController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostMapping(API + "/list.do")
|
|
|
|
|
public JsonResult<PageQuery> listDo(TeacherOpenCourseQuestionLogQuery condition){
|
|
|
|
|
PageQuery page = condition.getPageQuery();
|
|
|
|
|
teacherOpenCourseQuestionLogService.queryByConditionQuery(page);
|
|
|
|
|
return JsonResult.success(page);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 学生端-教师端-根据题目配置信息,获取相关的题目
|
|
|
|
|
* 每次获取
|
|
|
|
|
*
|
|
|
|
|
* @param teacherOpenCourseQuestionSettingId 配置ID
|
|
|
|
|
* @param fromTypeEnum 来源类型
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping(API + "/questionDetail.json")
|
|
|
|
|
public JsonResult questionDetail(Long teacherOpenCourseQuestionSettingId,
|
|
|
|
|
ResourcesQuestionSnapshotFromTypeEnum fromTypeEnum, @SCoreUser CoreUser coreUser) {
|
|
|
|
|
Assert.isTrue(coreUser.isStudent(), "非学生身份,无法获取题目!");
|
|
|
|
|
return JsonResult.success(teacherOpenCourseQuestionLogService.questionDetail(teacherOpenCourseQuestionSettingId, fromTypeEnum));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 学生端-和题目有关的提交方法 (章节测试、考试、作业)
|
|
|
|
|
* <li>支持附件上传</li>
|
|
|
|
|
* 答案集合中,会包含"/"字符串,则代表是路径地址,则是附件类型的答案
|
|
|
|
|
*
|
|
|
|
|
* @param questionLogMap <题目快照ID, [数组:前端传递过来不需要考虑排序和重复问题]> 例: {"10086": ["D", "A", "B", "A"]}
|
|
|
|
|
* @param questionSettingId 题目配置ID 简单理解,区分属于哪套卷子:章节测试、考试、作业 目前支持这三种类型。作业中,又区分题目作业,和附件作业。
|
|
|
|
|
* @param coreUser 用来验证用户登录,为了解耦不会传递到Service层
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping(API + "/addQuestionLog.do")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public JsonResult addQuestionLog(
|
|
|
|
|
@RequestBody
|
|
|
|
|
Map<Long, TreeSet<String>> questionLogMap,
|
|
|
|
|
Long questionSettingId,
|
|
|
|
|
@SCoreUser
|
|
|
|
|
CoreUser coreUser) {
|
|
|
|
|
Assert.isTrue(coreUser.isStudent(), "非学生身份,无法提交!");
|
|
|
|
|
teacherOpenCourseQuestionLogService.insertQuestionLog(questionLogMap, questionSettingId);
|
|
|
|
|
return JsonResult.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 学生端-答题后显示答案、和分析
|
|
|
|
|
*
|
|
|
|
|
* @param questionSnapshotIds [题目快照ID]
|
|
|
|
|
* @param coreUser 用来验证用户登录,为了解耦不会传递到Service层
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping(API + "/questionAnalysis.do")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public JsonResult questionAnalysis(
|
|
|
|
|
@RequestBody
|
|
|
|
|
TreeSet<Long> questionSnapshotIds,
|
|
|
|
|
@SCoreUser
|
|
|
|
|
CoreUser coreUser) {
|
|
|
|
|
Assert.isTrue(coreUser.isStudent(), "非学生身份,无法获取题目分析!");
|
|
|
|
|
return JsonResult.success(teacherOpenCourseQuestionLogService.questionAnalysis(questionSnapshotIds));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 学生端-教师端-学生总得分列表
|
|
|
|
|
*
|
|
|
|
|
* @param condition 题目配置ID
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping(API + "/studentScoreList.do")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public JsonResult<PageQuery> studentScoreList(
|
|
|
|
|
@NotNull(message = "查询条件不能为空!") TeacherOpenCourseQuestionLogQuery condition){
|
|
|
|
|
PageQuery page = condition.getPageQuery();
|
|
|
|
|
teacherOpenCourseQuestionLogService.studentScoreList(page);
|
|
|
|
|
return JsonResult.success(page);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* 后台页面 */
|
|
|
|
|
|
|
|
|
@ -194,82 +273,6 @@ public class TeacherOpenCourseQuestionLogController {
|
|
|
|
|
return JsonResult.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 学生端-教师端-根据题目配置信息,获取相关的题目
|
|
|
|
|
* 每次获取
|
|
|
|
|
*
|
|
|
|
|
* @param teacherOpenCourseQuestionSettingId 配置ID
|
|
|
|
|
* @param fromTypeEnum 来源类型
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping(MODEL + "/questionDetail.json")
|
|
|
|
|
@Function("teacherOpenCourseQuestionLog.query")
|
|
|
|
|
public JsonResult questionDetail(Long teacherOpenCourseQuestionSettingId,
|
|
|
|
|
ResourcesQuestionSnapshotFromTypeEnum fromTypeEnum, @SCoreUser CoreUser coreUser) {
|
|
|
|
|
Assert.isTrue(coreUser.isStudent(), "非学生身份,无法获取题目!");
|
|
|
|
|
return JsonResult.success(teacherOpenCourseQuestionLogService.questionDetail(teacherOpenCourseQuestionSettingId, fromTypeEnum));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 学生端-和题目有关的提交方法 (章节测试、考试、作业)
|
|
|
|
|
* <li>支持附件上传</li>
|
|
|
|
|
* 答案集合中,会包含"/"字符串,则代表是路径地址,则是附件类型的答案
|
|
|
|
|
*
|
|
|
|
|
* @param questionLogMap <题目快照ID, [数组:前端传递过来不需要考虑排序和重复问题]> 例: {"10086": ["D", "A", "B", "A"]}
|
|
|
|
|
* @param questionSettingId 题目配置ID 简单理解,区分属于哪套卷子:章节测试、考试、作业 目前支持这三种类型。作业中,又区分题目作业,和附件作业。
|
|
|
|
|
* @param coreUser 用来验证用户登录,为了解耦不会传递到Service层
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping(MODEL + "/addQuestionLog.json")
|
|
|
|
|
@Function("teacherOpenCourseQuestionLog.add")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public JsonResult addQuestionLog(
|
|
|
|
|
@RequestBody
|
|
|
|
|
Map<Long, TreeSet<String>> questionLogMap,
|
|
|
|
|
Long questionSettingId,
|
|
|
|
|
@SCoreUser
|
|
|
|
|
CoreUser coreUser) {
|
|
|
|
|
Assert.isTrue(coreUser.isStudent(), "非学生身份,无法提交!");
|
|
|
|
|
teacherOpenCourseQuestionLogService.insertQuestionLog(questionLogMap, questionSettingId);
|
|
|
|
|
return JsonResult.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 学生端-答题后显示答案、和分析
|
|
|
|
|
*
|
|
|
|
|
* @param questionSnapshotIds [题目快照ID]
|
|
|
|
|
* @param coreUser 用来验证用户登录,为了解耦不会传递到Service层
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping(MODEL + "/questionAnalysis.json")
|
|
|
|
|
@Function("teacherOpenCourseQuestionLog.query")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public JsonResult questionAnalysis(
|
|
|
|
|
@RequestBody
|
|
|
|
|
TreeSet<Long> questionSnapshotIds,
|
|
|
|
|
@SCoreUser
|
|
|
|
|
CoreUser coreUser) {
|
|
|
|
|
Assert.isTrue(coreUser.isStudent(), "非学生身份,无法获取题目分析!");
|
|
|
|
|
return JsonResult.success(teacherOpenCourseQuestionLogService.questionAnalysis(questionSnapshotIds));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 学生端-教师端-学生总得分列表
|
|
|
|
|
*
|
|
|
|
|
* @param condition 题目配置ID
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping(MODEL + "/studentScoreList.json")
|
|
|
|
|
@Function("teacherOpenCourseQuestionLog.query")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public JsonResult<PageQuery> studentScoreList(
|
|
|
|
|
@NotNull(message = "查询条件不能为空!") TeacherOpenCourseQuestionLogQuery condition){
|
|
|
|
|
PageQuery page = condition.getPageQuery();
|
|
|
|
|
teacherOpenCourseQuestionLogService.studentScoreList(page);
|
|
|
|
|
return JsonResult.success(page);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 学生端-教师端-单个学生做题日志详情
|
|
|
|
|
* 转到 {@link #list(TeacherOpenCourseQuestionLogQuery condition)}
|
|
|
|
|