Bladeren bron

feat:课程作业结果统计

YPLee 6 jaren geleden
bovenliggende
commit
2c42fec367

+ 22 - 1
routes/statistics/statistics.raml

@@ -10,4 +10,25 @@
         groupId:
           type: integer
           description: 小组id
-      is: [response: { typeName: 'CommitDetails[]' }]    
+      is: [response: { typeName: 'CommitDetails[]' }]    
+
+
+/course/{courseId}:
+  uriParameters: 
+    courseId: 
+      type: integer
+      description: 课程id
+  get:
+    displayName: 老师获取某次代码作业的成绩统计
+    is: [response: {typeName: 'ResultStatistics[]' }]
+  /percent:
+    get:
+      displayName: 老师获取某门课各种类型的作业的成绩占百分比信息
+      is: [response: {typeName: 'ResultPercent' }]
+    post:
+      displayName: 老师设置某一门课各种作业的成绩占百分比信息
+      body: 
+        application/json:
+          type: ResultPercent
+      is: [empty_response]
+            

+ 13 - 0
types/assignment/codework/PercentItemDTO.raml

@@ -0,0 +1,13 @@
+#%RAML 1.0 DataType
+# 作业在整个类型作业中的占比
+type: object
+properties:
+  id:
+    type: integer
+    description: 作业id
+  name:
+    type: string
+    description: 作业名称
+  percent:
+    type: integer
+    description: 成绩所占百分比  

+ 16 - 0
types/assignment/codework/ResultNestedScore.raml

@@ -0,0 +1,16 @@
+#%RAML 1.0 DataType
+# ResultNestedScore 代码作业结果统计类的内嵌Score信息vo
+type: object
+properties:
+  id:
+    type: integer
+    descripton: 作业id
+  name:
+    type: string
+    descripton: 作业名称
+  percent:
+    type: integer
+    descripton: 作业占整个类型作业的得分权重百分比
+  score:
+    type: integer
+    descripton: 作业得分    

+ 14 - 0
types/assignment/codework/ResultPercent.raml

@@ -0,0 +1,14 @@
+#%RAML 1.0 DataType
+# 一门课程所有类型作业的相关信息
+type: object
+properties:
+  documents:
+    type: PercentItemDTO[]
+    description: 所有的文档作业的信息
+  reviews:
+    type: PercentItemDTO[]
+    description: 所有的互评作业的信息
+  codes:
+    type: PercentItemDTO[]
+    description: 所有的代码作业的信息
+        

+ 19 - 0
types/assignment/codework/ResultStatistics.raml

@@ -0,0 +1,19 @@
+#%RAML 1.0 DataType
+# 关于一门课程的所有作业完成情况
+type: object
+properties:
+  id:
+    type: integer
+  user:
+    type: User
+    description: 选课学生信息
+  documents:
+    type: ResultNestedScore[] 
+    description: 该门课程全部文档作业的完成情况
+  reviews:
+    type: ResultNestedScore[] 
+    description: 该门课程全部互评作业的完成情况
+  codes:
+    type: ResultNestedScore[]
+    description: 该门课程全部代码作业的完成情况
+          

+ 4 - 0
types/index.raml

@@ -45,6 +45,10 @@ FunctionalTestDTO: !include ./assignment/codework/FunctionalTestDTO.raml
 DeployDTO: !include ./assignment/codework/DeployDTO.raml
 DeployResponse: !include ./assignment/codework/DeployResponse.raml
 CommitDetails: !include ./assignment/codework/CommitDetails.raml
+ResultNestedScore: !include ./assignment/codework/ResultNestedScore.raml
+ResultStatistics: !include ./assignment/codework/ResultStatistics.raml
+PercentItemDTO: !include ./assignment/codework/PercentItemDTO.raml
+ResultPercent: !include ./assignment/codework/ResultPercent.raml
 
 # Enums
 UserIdentity: !include ./enums/UserIdentity.raml