|
@@ -1,39 +1,61 @@
|
|
|
package cn.com.qmth.examcloud.api.commons.enums;
|
|
|
|
|
|
/**
|
|
|
- *
|
|
|
- * @Description: 考试类型
|
|
|
- * @author ting.yin
|
|
|
- * @date 2017年1月5日
|
|
|
+ * @ClassName ExamType
|
|
|
+ * @Author nikang
|
|
|
+ * @Date 2018/9/21 17:56
|
|
|
+ * @Version 3.0
|
|
|
*/
|
|
|
public enum ExamType {
|
|
|
- /**
|
|
|
- * 传统
|
|
|
- */
|
|
|
- TRADITION,
|
|
|
+ /**
|
|
|
+ * 传统考试
|
|
|
+ */
|
|
|
+ TRADITION("传统考试"),
|
|
|
+ /**
|
|
|
+ * 在线考试
|
|
|
+ */
|
|
|
+ ONLINE("在线考试"),
|
|
|
+ /**
|
|
|
+ * 在线练习
|
|
|
+ */
|
|
|
+ PRACTICE("练习"),
|
|
|
|
|
|
- /**
|
|
|
- * 网考
|
|
|
- */
|
|
|
- ONLINE,
|
|
|
+ /**
|
|
|
+ * 离线考试
|
|
|
+ */
|
|
|
+ OFFLINE("离线考试"),
|
|
|
|
|
|
- /**
|
|
|
- * 练习
|
|
|
- */
|
|
|
- PRACTICE,
|
|
|
+ /**
|
|
|
+ * 分布式印刷考试
|
|
|
+ */
|
|
|
+ PRINT_EXAM("分布式印刷考试"),
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 在线作业
|
|
|
+ */
|
|
|
+ ONLINE_HOMEWORK("在线作业");
|
|
|
|
|
|
- /**
|
|
|
- * 离线
|
|
|
- */
|
|
|
- OFFLINE,
|
|
|
+ private String title;
|
|
|
|
|
|
- /**
|
|
|
- * 分布式印刷考试
|
|
|
- */
|
|
|
- PRINT_EXAM,
|
|
|
+ private ExamType(String title) {
|
|
|
+ this.title = title;
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 在线作业
|
|
|
- */
|
|
|
- ONLINE_HOMEWORK
|
|
|
+ public static ExamType strToEnum(String str) {
|
|
|
+ for (ExamType examType : ExamType.values()) {
|
|
|
+ if (examType.name().equals(str)) {
|
|
|
+ return examType;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static String getTitle(String name) {
|
|
|
+ for (ExamType examType : ExamType.values()) {
|
|
|
+ if (examType.name().equals(name)) {
|
|
|
+ return examType.title;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
}
|