Browse Source

Merge branch 'task-model-modify' into 'DEV'

MOD: task model



See merge request !21

梅杰 8 years ago
parent
commit
a620637fec

+ 7 - 0
mooctest-site-server/src/main/java/cn/iselab/mooctest/site/models/Task.java

@@ -39,6 +39,9 @@ public class Task {
     @Column(name = "subsite_id")
     private Long subsiteId;
 
+    @Column(name = "type")
+    private Byte type;// exam: 0, exercise: 1, activity: 2
+
     public Long getId() {
         return id;
     }
@@ -102,4 +105,8 @@ public class Task {
     public void setSubsiteId(Long subsiteId) {
         this.subsiteId = subsiteId;
     }
+
+    public Byte getType() { return type; }
+
+    public void setType(Byte type) { this.type = type; }
 }

+ 3 - 10
mooctest-site-server/src/main/java/cn/iselab/mooctest/site/web/data/ExamVO.java

@@ -16,10 +16,9 @@ public class ExamVO {
     private String managerName;
     private Integer duration;
     private List<Long> groupIds;
-
-    private Integer workerCount;
     private List<String> groupNames;
     private Integer status;
+    private Byte type;
 
     public Long getId() {
         return id;
@@ -101,14 +100,6 @@ public class ExamVO {
         this.groupIds = groupIds;
     }
 
-    public Integer getWorkerCount() {
-        return workerCount;
-    }
-
-    public void setWorkerCount(Integer workerCount) {
-        this.workerCount = workerCount;
-    }
-
     public List<String> getGroupNames() {
         return groupNames;
     }
@@ -125,5 +116,7 @@ public class ExamVO {
         this.status = status;
     }
 
+    public Byte getType() { return type; }
 
+    public void setType(Byte type) { this.type = type; }
 }

+ 1 - 0
mooctest-site-server/src/main/java/cn/iselab/mooctest/site/web/data/wrapper/ExamVOWrapper.java

@@ -46,6 +46,7 @@ public class ExamVOWrapper extends BaseWrapper<ExamVO, Task> {
         vo.setManagerId(task.getManagerId());
         vo.setDuration(task.getDuration());
         vo.setInfo(task.getInformation());
+        vo.setType(task.getType());
 
         long curr = System.currentTimeMillis();
         if (vo.getBeginTime() > curr) {