From 739f59b0043e546a3eeb7b859260caefe30f3efb Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 5 Aug 2019 16:34:25 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20190805010545_modify_ke_contents_for_markdown.rb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/db/migrate/20190805010545_modify_ke_contents_for_markdown.rb b/db/migrate/20190805010545_modify_ke_contents_for_markdown.rb index 67b57b215..4b66add63 100644 --- a/db/migrate/20190805010545_modify_ke_contents_for_markdown.rb +++ b/db/migrate/20190805010545_modify_ke_contents_for_markdown.rb @@ -14,13 +14,6 @@ class ModifyKeContentsForMarkdown < ActiveRecord::Migration[5.2] # m.update_column(:content, content) # end # - # # 试卷的描述 - # Exercise.find_each do |e| - # exercise_description = ke_transform_to_md e.exercise_description - # puts("#exercise_description: #{exercise_description}") - # e.update_column(:exercise_description, exercise_description) - # end - # # # 试卷的标题 # ExerciseQuestion.find_each do |eq| # question_title = ke_transform_to_md eq.question_title From ad7c52aa14c113a65168b0b1cb5caa9cca462025 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Mon, 5 Aug 2019 17:34:55 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=AF=95=E5=8D=B7-=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exercise/Exercisestatisticalresult.js | 79 ++++++++++++++++--- .../courses/exercise/Exercisetablesmubu.js | 51 +----------- 2 files changed, 68 insertions(+), 62 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js b/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js index 34f32b234..d2b800b73 100644 --- a/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js +++ b/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js @@ -154,7 +154,7 @@ class Exercisestatisticalresult extends Component { }
-
+
@@ -198,16 +198,70 @@ class Exercisestatisticalresult extends Component { .padtop24{ padding-top: 24px; } - + .exerciseTable .shixunreporttitle{ + padding:0px!important; + } + .exerciseTable .ant-table-thead > tr > th,.exerciseTable .ant-table-tbody > tr > td{ + padding:16px 20px!important; + } `} - + {/* 从子组件将样式提出来,不然会循环多次 */} + {data&&data.commit_results.map((item,key)=>{ - return( -
-
-
+
+
+
{item.ques_position+"."}{item.ques_type===0?"单选":item.ques_type===1?"多选":item.ques_type===2?"判断":item.ques_type===3?"填空":item.ques_type===4?"主观":item.ques_type===5?"实训":""}题
{/*Q{item.ques_position}:*/} @@ -224,14 +278,15 @@ class Exercisestatisticalresult extends Component { item.ques_details.map((ite,k)=>{ return( -
-
-
+
+
+
{ite.challenge_position}:{ite.challenge_name}
-
正确率{ite.challenge_percent}%
+
正确率 {ite.challenge_percent}%
- + {datas===undefined?"": Date: Mon, 5 Aug 2019 17:50:34 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exercise/Exercisestatisticalresult.js | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js b/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js index d2b800b73..85ea6c902 100644 --- a/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js +++ b/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js @@ -124,7 +124,7 @@ class Exercisestatisticalresult extends Component { } `} -
+
{data&&data.course_groups.length===0?"":
@@ -204,6 +204,9 @@ class Exercisestatisticalresult extends Component { .exerciseTable .ant-table-thead > tr > th,.exerciseTable .ant-table-tbody > tr > td{ padding:16px 20px!important; } + .exerciseTable .editormd-html-preview{ + width:100%!important; + } `} {/* 从子组件将样式提出来,不然会循环多次 */} @@ -260,8 +263,8 @@ class Exercisestatisticalresult extends Component { {data&&data.commit_results.map((item,key)=>{ return(
-
-
+
+
{item.ques_position+"."}{item.ques_type===0?"单选":item.ques_type===1?"多选":item.ques_type===2?"判断":item.ques_type===3?"填空":item.ques_type===4?"主观":item.ques_type===5?"实训":""}题
{/*Q{item.ques_position}:*/} @@ -307,24 +310,20 @@ class Exercisestatisticalresult extends Component { })}
- -
- - - -
+ { + data && data.questions_count > 10 && +
+ +
+ } +