mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-07 01:46:47 +08:00
考试随机选题
This commit is contained in:
@@ -232,8 +232,8 @@ public class CourseContentServiceImpl implements ICourseContentService {
|
||||
if (randomMode && qnum != null && qnum > 0 && itemsNodes.size() > qnum) {
|
||||
Collections.shuffle(itemsNodes);
|
||||
itemsNodes = itemsNodes.subList(0, qnum);
|
||||
return itemsNodes;
|
||||
}
|
||||
return itemsNodes;
|
||||
} else if (courseExam.getPaperType() == 2 && randomMode && qnum != null && qnum > 0) {
|
||||
IXaskCache cache = XaskCacheProvider.getCache();
|
||||
String cacheKey = "course:exam:" + courseExamId + ":" + paperId;
|
||||
@@ -253,8 +253,8 @@ public class CourseContentServiceImpl implements ICourseContentService {
|
||||
if (eqVoList.size() > qnum) {
|
||||
Collections.shuffle(eqVoList);
|
||||
eqVoList = eqVoList.subList(0, qnum);
|
||||
return eqVoList;
|
||||
}
|
||||
return eqVoList;
|
||||
}
|
||||
|
||||
} catch (JsonProcessingException e) {
|
||||
|
||||
Reference in New Issue
Block a user