|
|
@@ -27,6 +27,17 @@ public class ExamConvertor {
|
|
|
return examVO;
|
|
|
}
|
|
|
|
|
|
+ public static ExamVO convertToJoinedVO(Exam exam) {
|
|
|
+ ExamVO examVO = new ExamVO();
|
|
|
+ BeanUtils.copyProperties(exam, examVO);
|
|
|
+ examVO.setExamId(exam.getId());
|
|
|
+ examVO.setCreatorId(exam.getCreator().getId());
|
|
|
+ examVO.setAntiCheating(exam.getAntiCheating() == 1);
|
|
|
+ examVO.setIsPublic(exam.getIsPublic() == 1);
|
|
|
+ examVO.setIsJoined(true);
|
|
|
+ return examVO;
|
|
|
+ }
|
|
|
+
|
|
|
public static ExamInfoVO convertToExamInfoVO(Exam exam) {
|
|
|
ExamInfoVO examInfoVO = new ExamInfoVO();
|
|
|
BeanUtils.copyProperties(exam, examInfoVO);
|