ソースを参照

试题,后台

lizhen_gitee 8 ヶ月 前
コミット
7fe5f7c643

+ 3 - 3
application/admin/model/exam/QuestionModel.php

@@ -37,7 +37,7 @@ class QuestionModel extends BaseModel
             'explain_video_url',
         ];
 
-    const kindList       = ['JUDGE', 'SINGLE', 'MULTI', 'FILL', 'SHORT', 'MATERIAL'];
+    const kindList       = ['JUDGE', 'SINGLE', 'MULTI', /*'FILL',*/ 'SHORT', /*'MATERIAL'*/];
     const difficultyList = ['EASY', 'GENERAL', 'HARD'];
     const statusList     = ['NORMAL', 'HIDDEN'];
 
@@ -47,9 +47,9 @@ class QuestionModel extends BaseModel
             'JUDGE'    => '判断题',
             'SINGLE'   => '单选题',
             'MULTI'    => '多选题',
-            'FILL'     => '填空题',
+//            'FILL'     => '填空题',
             'SHORT'    => '简答题',
-            'MATERIAL' => '材料题',
+//            'MATERIAL' => '材料题',
         ];
     }
 

+ 7 - 4
application/admin/view/exam/question/add.html

@@ -60,8 +60,11 @@
                 </div>
             </div>
         </div>
+        <input name="row[is_material_child]" type="hidden" value="0">
+        <input name="row[material_question_id]" type="hidden" value="">
+        <input name="row[material_score]" type="hidden" value="0">
 
-        <div class="form-group" id="is_material_child">
+        <!--<div class="form-group" id="is_material_child">
             <label class="control-label col-xs-12 col-sm-2">{:__('is_material_child')}:</label>
             <div class="col-xs-12 col-sm-8">
                 <div class="radio">
@@ -88,7 +91,7 @@
             <div class="col-xs-12 col-sm-8">
                 <input id="c-material_score" class="form-control" name="row[material_score]" type="number" value="0" step="1">
             </div>
-        </div>
+        </div>-->
 
         <!--原题型 -->
         <div v-show="kind === 'JUDGE' || kind === 'SINGLE' || kind === 'MULTI'">
@@ -186,7 +189,7 @@
             </div>
         </div>
 
-        <div class="form-group">
+        <!--<div class="form-group">
             <label class="control-label col-xs-12 col-sm-2">{:__('Difficulty')}:</label>
             <div class="col-xs-12 col-sm-8">
 
@@ -197,7 +200,7 @@
                 </select>
 
             </div>
-        </div>
+        </div>-->
         <div class="form-group">
             <label class="control-label col-xs-12 col-sm-2">{:__('Explain')}:</label>
             <div class="col-xs-12 col-sm-8">

+ 7 - 4
application/admin/view/exam/question/edit.html

@@ -53,8 +53,11 @@
 
         </div>
     </div>
+    <input name="row[is_material_child]" type="hidden" value="0">
+    <input name="row[material_question_id]" type="hidden" value="">
+    <input name="row[material_score]" type="hidden" value="0">
 
-    <div class="form-group" id="is_material_child">
+    <!--<div class="form-group" id="is_material_child">
         <label class="control-label col-xs-12 col-sm-2">{:__('is_material_child')}:</label>
         <div class="col-xs-12 col-sm-8">
             <div class="radio">
@@ -81,7 +84,7 @@
         <div class="col-xs-12 col-sm-8">
             <input id="c-material_score" class="form-control" name="row[material_score]" type="number" value="{$row.material_score|htmlentities}">
         </div>
-    </div>
+    </div>-->
 
 
     <!--原题型-->
@@ -184,7 +187,7 @@
         </div>
     </div>
 
-    <div class="form-group">
+    <!--<div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Difficulty')}:</label>
         <div class="col-xs-12 col-sm-8">
 
@@ -195,7 +198,7 @@
             </select>
 
         </div>
-    </div>
+    </div>-->
 
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Explain')}:</label>

+ 5 - 5
public/assets/js/backend/exam/question.js

@@ -59,24 +59,24 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'upload'], function (
                         {
                             field: 'kind',
                             title: __('Kind'),
-                            searchList: {"JUDGE": __('Judge'), "SINGLE": __('Single'), "MULTI": __('Multi'), "FILL": __('Fill'), "SHORT": __('Short'), "MATERIAL": __('Material')},
+                            searchList: {"JUDGE": __('Judge'), "SINGLE": __('Single'), "MULTI": __('Multi'), /*"FILL": __('Fill'),*/ "SHORT": __('Short')/*, "MATERIAL": __('Material')*/},
                             formatter: Table.api.formatter.normal,
                             // operate: "IN",
                         },
                         {field: 'title', title: __('Title'), autocomplete: false, operate: 'LIKE', formatter: Table.api.formatter.content},
-                        {
+                        /*{
                           field: 'is_material_child',
                           title: __('属于材料题子题'),
                           searchList: {"0": __('否'), "1": __('是')},
                           defaultValue: 0,
                           visible: false
-                        },
-                        {
+                        },*/
+                       /* {
                             field: 'difficulty',
                             title: __('Difficulty'),
                             searchList: {"EASY": __('Easy'), "GENERAL": __('General'), "HARD": __('Hard')},
                             formatter: Table.api.formatter.normal
-                        },
+                        },*/
                         {
                             field: 'answer', title: __('Answer'), halign: 'center', align: 'left', operate: false, formatter: function (value, row, index) {
                                 var answer = value;