From 679f0a5d819eeee77d9636fc15e4e68894eeb8ad Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 26 Jul 2019 18:24:23 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=9A=84=E9=AB=98=E6=A0=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20190726101533_modify_test_user_for_school.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 db/migrate/20190726101533_modify_test_user_for_school.rb diff --git a/db/migrate/20190726101533_modify_test_user_for_school.rb b/db/migrate/20190726101533_modify_test_user_for_school.rb new file mode 100644 index 00000000..f2ecc3e7 --- /dev/null +++ b/db/migrate/20190726101533_modify_test_user_for_school.rb @@ -0,0 +1,13 @@ +class ModifyTestUserForSchool < ActiveRecord::Migration + def up + school_ids = School.pluck(:id) + users = User.where(is_test: true).includes(:user_extensions) + users.find_each do |u| + school_id = school_ids.sample + u.user_extensions.update_column(:school_id, school_id) if u.user_extensions.present? + end + end + + def down + end +end From 718f08a568c1df54ff3ac9d46deee13a09685495 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 26 Jul 2019 18:31:00 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E9=AB=98=E6=A0=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20190726101533_modify_test_user_for_school.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20190726101533_modify_test_user_for_school.rb b/db/migrate/20190726101533_modify_test_user_for_school.rb index f2ecc3e7..2b9d4f43 100644 --- a/db/migrate/20190726101533_modify_test_user_for_school.rb +++ b/db/migrate/20190726101533_modify_test_user_for_school.rb @@ -1,6 +1,6 @@ class ModifyTestUserForSchool < ActiveRecord::Migration def up - school_ids = School.pluck(:id) + school_ids = School.where("id < 1500").pluck(:id) users = User.where(is_test: true).includes(:user_extensions) users.find_each do |u| school_id = school_ids.sample From f6f49673f9e2df89aba86854250d0b458e1c3cda Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 27 Jul 2019 15:13:10 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=8A=A5=E5=90=8D?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=A1=86--=E6=8F=90=E7=A4=BA=E6=96=87?= =?UTF-8?q?=E5=AD=97=E5=B1=85=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/edu/application.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/javascripts/edu/application.js b/public/javascripts/edu/application.js index 36c0764f..201f5d69 100644 --- a/public/javascripts/edu/application.js +++ b/public/javascripts/edu/application.js @@ -263,7 +263,7 @@ function sure_box_redirect_btn(url, str,btnstr){ function sure_box_redirect_btn2(url, str, btnstr){ - var htmlvalue = '

提示

'+ + var htmlvalue = '
提示
'+ '

' + str + '

'; pop_box_new(htmlvalue, 578, 205); @@ -273,14 +273,14 @@ function sure_box_redirect_btn2(url, str, btnstr){ //提示框:只有一个知道啦按钮,点击打开新窗口 // function sure_box_redirect_without_newtab(url, str){ - var htmlvalue = '

提示

'+ + var htmlvalue = '
提示
'+ '

' + str + '

'; pop_box_new(htmlvalue, 480, 160); } //按钮内容自定义 function sure_box_redirect_without_newtab_btn(url, str,btnstr){ - var htmlvalue = '

提示

'+ + var htmlvalue = '
提示
'+ '

' + str + '

'; pop_box_new(htmlvalue, 480, 160); @@ -289,7 +289,7 @@ function sure_box_redirect_without_newtab_btn(url, str,btnstr){ //提示框:只有一个确定按钮,点击跳转 // function notice_box_redirect(url, str){ - var htmlvalue = '

提示

'+ + var htmlvalue = '
提示
'+ '

' + str + '

'+ '确定
'; pop_box_new(htmlvalue, 480, 160); @@ -298,7 +298,7 @@ function notice_box_redirect(url, str){ //提示框:只有一个确定按钮,点击跳转(局部刷新) // function notice_box_redirect_remote(url, str){ - var htmlvalue = '

提示

'+ + var htmlvalue = '
提示
'+ '

' + str + '

'+ '确定
'; pop_box_new(htmlvalue, 480, 160); From a99b85b280177a61ca34cf3c5ee83c8b951f1ad9 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 27 Jul 2019 16:02:01 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=AB=9E=E8=B5=9B-=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=A0=87=E6=B3=A8=E7=BB=84-title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/competitions/_gq_second_code_competition.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/competitions/_gq_second_code_competition.html.erb b/app/views/competitions/_gq_second_code_competition.html.erb index 7e681b2e..bc54e485 100644 --- a/app/views/competitions/_gq_second_code_competition.html.erb +++ b/app/views/competitions/_gq_second_code_competition.html.erb @@ -82,7 +82,7 @@ second_section = stage.competition_stage_sections[1] %>
"> -

<%= stage.name %>

+

<%= index == 2 ? '经典算法阅读与标注' : index == 3 ? '自然语言处理NLP' : '深度学习框架' %>

  • <%= first_section.try(:name) %>