|
@@ -30,6 +30,7 @@ import cn.com.qmth.stmms.biz.exam.query.ExamStudentSearchQuery;
|
|
|
import cn.com.qmth.stmms.biz.exam.service.ExamQuestionService;
|
|
|
import cn.com.qmth.stmms.biz.exam.service.ExamService;
|
|
|
import cn.com.qmth.stmms.biz.exam.service.ExamStudentService;
|
|
|
+import cn.com.qmth.stmms.biz.exam.service.ExamSubjectService;
|
|
|
import cn.com.qmth.stmms.biz.exam.service.InspectedService;
|
|
|
import cn.com.qmth.stmms.biz.file.service.FileService;
|
|
|
import cn.com.qmth.stmms.biz.lock.LockService;
|
|
@@ -76,6 +77,9 @@ public class InspectedController extends BaseExamController {
|
|
|
@Autowired
|
|
|
private TaskService taskService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ExamSubjectService subjectService;
|
|
|
+
|
|
|
@Value("${slice.split.config}")
|
|
|
private String splitConfig;
|
|
|
|
|
@@ -329,12 +333,22 @@ public class InspectedController extends BaseExamController {
|
|
|
|
|
|
@RequestMapping(value = "/getSetting", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
- public JSONObject getSetting(HttpServletRequest request) {
|
|
|
+ public JSONObject getSetting(HttpServletRequest request, @RequestParam(required = false) String subjectCode) {
|
|
|
JSONObject setting = new JSONObject();
|
|
|
WebUser wu = RequestUtils.getWebUser(request);
|
|
|
setting.accumulate("fileServer", fileService.getFileServer());
|
|
|
setting.accumulate("userName", wu.getName());
|
|
|
setting.accumulate("splitConfig", getSplitConfig());
|
|
|
+ if (StringUtils.isNotBlank(subjectCode)) {
|
|
|
+ int examId = getSessionExamId(request);
|
|
|
+ ExamSubject examSubject = subjectService.find(examId, subjectCode);
|
|
|
+ JSONObject subject = new JSONObject();
|
|
|
+ subject.accumulate("name", examSubject.getName());
|
|
|
+ subject.accumulate("code", examSubject.getCode());
|
|
|
+ subject.accumulate("paperUrl", examSubject.getPaperUrl() == null ? "" : examSubject.getPaperUrl());
|
|
|
+ subject.accumulate("answerUrl", examSubject.getAnswerUrl() == null ? "" : examSubject.getAnswerUrl());
|
|
|
+ setting.accumulate("subject", subject);
|
|
|
+ }
|
|
|
return setting;
|
|
|
}
|
|
|
|