From 29e334c7f4e0c4aec66c5350383bb1e176b90025 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 24 Jul 2019 12:06:16 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/course_second_category.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/course_second_category.rb b/app/models/course_second_category.rb index 125a81cb6..630b74807 100644 --- a/app/models/course_second_category.rb +++ b/app/models/course_second_category.rb @@ -5,7 +5,7 @@ class CourseSecondCategory < ApplicationRecord belongs_to :course_module has_many :homework_commons - validates :name, length: { maximum: 30 } + validates :name, length: { maximum: 60 } def category_type_str category_type == "graduation" && name == "毕设选题" ? "graduation_topics" : ( From f064afdd46e70f0568efa0651425a29fc27f0c94 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 24 Jul 2019 12:31:49 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E7=AD=94=E6=A1=88=E8=AE=B0=E5=BD=95=E6=89=A3=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20190724013024_modify_final_score_for_games.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 db/migrate/20190724013024_modify_final_score_for_games.rb diff --git a/db/migrate/20190724013024_modify_final_score_for_games.rb b/db/migrate/20190724013024_modify_final_score_for_games.rb new file mode 100644 index 000000000..e926cccd6 --- /dev/null +++ b/db/migrate/20190724013024_modify_final_score_for_games.rb @@ -0,0 +1,15 @@ +class ModifyFinalScoreForGames < ActiveRecord::Migration[5.2] + def change + grades = Grade.where(container_type: "Answer") + grades.each do |grade| + g = Game.find_by_id(grade.container_id) + if g.present? + if g.status == 2 && g.answer_open > 0 && g.final_score <= 0 && g.end_time < grade.created_at + g.update_column(:final_score, g.challenge.score) + elsif g.final_score < 0 + g.update_column(:final_score, 0) + end + end + end + end +end From 976798de574e3a566dee6ec3f812d7c8c37e9fe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 24 Jul 2019 12:33:33 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/NewHeader.js | 190 +++------------------- 1 file changed, 21 insertions(+), 169 deletions(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 830c8b1d4..37fac626d 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -495,6 +495,7 @@ submittojoinclass=(value)=>{ } hideshowSearchOpen=(e)=>{ + debugger let {setevaluatinghides}=this.state; if(setevaluatinghides===true){ this.setState({ @@ -519,6 +520,7 @@ submittojoinclass=(value)=>{ } setevaluatinghides=()=>{ + debugger this.setState( { setevaluatinghides:true @@ -600,6 +602,7 @@ submittojoinclass=(value)=>{ // rolearr:["",""], // console.log("618"); // console.log(user_phone_binded); + console.log(showSearchOpentype) return (