Browse Source

考试管理

eganwu 1 year ago
parent
commit
b6178794bf

+ 18 - 0
src/custom/restcontroller/webmanage/saletool/courseware/coursewaretesthead.java

@@ -107,6 +107,24 @@ public class coursewaretesthead extends Controller {
 
         JSONArray jsonArray = detailRow.getJSONArray("testquestions");
         detailRow.put("testquestions", jsonArray);
+        for (Object object:jsonArray) {
+            JSONObject jsonObject= (JSONObject) object;
+            if (jsonObject.getLong("type") == 1) {
+                jsonObject.put("typestr", "选择题");
+            }
+            if (jsonObject.getLong("type") == 2) {
+                jsonObject.put("typestr", "简答题");
+            }
+            if (jsonObject.getLong("typemx") == 0) {
+                jsonObject.put("typemxstr", "简答");
+            }
+            if (jsonObject.getLong("typemx") == 1) {
+                jsonObject.put("typemxstr", "单选");
+            }
+            if (jsonObject.getLong("typemx") == 2) {
+                jsonObject.put("typemxstr", "多选");
+            }
+        }
 
         JSONArray sat_courseware_classids = detailRow.getJSONArray("sat_courseware_classids");
         if (sat_courseware_classids.size() == 0) {