From 29680bd7ad47dca57d69847539efca960104d4e0 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Fri, 19 Jul 2019 18:07:43 +0800 Subject: [PATCH 01/54] sync new git --- lib/tasks/gitlab_new.rake | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 lib/tasks/gitlab_new.rake diff --git a/lib/tasks/gitlab_new.rake b/lib/tasks/gitlab_new.rake new file mode 100644 index 00000000..fd6e0c56 --- /dev/null +++ b/lib/tasks/gitlab_new.rake @@ -0,0 +1,31 @@ +namespace :gitlab do + task :myshixun_newgit => :environment do + g = Gitlab.client + myshixuns = Myshixun.where("repo_name is null") + myshixuns.find_each do |myshixun| + begin + puts myshixun.id + repo_name = g.project(myshixun.gpid).path_with_namespace + puts repo_name + myshixun.update_column(:repo_name, repo_name) + rescue Exception => e + Rails.logger.error("e.message") + end + end + end + + task :shixun_newgit => :environment do + g = Gitlab.client + shixuns = Shixun.where("repo_name is null") + shixuns.find_each do |shixun| + begin + puts shixun.id + repo_name = g.project(shixun.gpid).path_with_namespace + puts shixun.id + shixun.update_column(:repo_name, repo_name) + rescue Exception => e + Rails.logger.error("e.message") + end + end + end +end From f539ed26bcf602d1943ac844bce7133fa4eabe39 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 19 Jul 2019 18:33:22 +0800 Subject: [PATCH 02/54] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...626064125_create_shixun_service_configs.rb | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/db/migrate/20190626064125_create_shixun_service_configs.rb b/db/migrate/20190626064125_create_shixun_service_configs.rb index a15a30f6..bb4a150c 100644 --- a/db/migrate/20190626064125_create_shixun_service_configs.rb +++ b/db/migrate/20190626064125_create_shixun_service_configs.rb @@ -1,14 +1,14 @@ class CreateShixunServiceConfigs < ActiveRecord::Migration def change - create_table :shixun_service_configs do |t| - t.references :shixun - t.integer :cpu_limit, :default => 1 - t.integer :memory_limit, :default => 1024 - t.integer :request_limit, :default => 10 - t.float :lower_cpu_limit, :default => 0.1 - t.integer :resource_limit, :default => 10000 - t.references :mirror_repository - t.timestamps - end + # create_table :shixun_service_configs do |t| + # t.references :shixun + # t.integer :cpu_limit, :default => 1 + # t.integer :memory_limit, :default => 1024 + # t.integer :request_limit, :default => 10 + # t.float :lower_cpu_limit, :default => 0.1 + # t.integer :resource_limit, :default => 10000 + # t.references :mirror_repository + # t.timestamps + # end end end From 291c33df66df37bb897dea2cedb6bd82a57f63e6 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 19 Jul 2019 18:34:55 +0800 Subject: [PATCH 03/54] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20190626070641_add_limit_for_shixuns.rb | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/db/migrate/20190626070641_add_limit_for_shixuns.rb b/db/migrate/20190626070641_add_limit_for_shixuns.rb index e403c061..e8ba1679 100644 --- a/db/migrate/20190626070641_add_limit_for_shixuns.rb +++ b/db/migrate/20190626070641_add_limit_for_shixuns.rb @@ -1,19 +1,19 @@ class AddLimitForShixuns < ActiveRecord::Migration def up - if !Challenge.first.has_attribute?(:exec_time) - add_column :challenges, :exec_time, :integer, :default => 120 - end - Shixun.find_each do |shixun| - shixun.challenges.update_all(:exec_time => shixun.exec_time) - shixun.mirror_repositories.each do |mirror| - ShixunServiceConfig.create!(:shixun_id => shixun.id, - :cpu_limit => mirror.cpu_limit, - :memory_limit => mirror.memory_limit, - :request_limit => mirror.memory_limit / 3, - :mirror_repository_id => mirror.id) - end - end - + # if !Challenge.first.has_attribute?(:exec_time) + # add_column :challenges, :exec_time, :integer, :default => 120 + # end + # Shixun.find_each do |shixun| + # shixun.challenges.update_all(:exec_time => shixun.exec_time) + # shixun.mirror_repositories.each do |mirror| + # ShixunServiceConfig.create!(:shixun_id => shixun.id, + # :cpu_limit => mirror.cpu_limit, + # :memory_limit => mirror.memory_limit, + # :request_limit => mirror.memory_limit / 3, + # :mirror_repository_id => mirror.id) + # end + # end + # end From 4fd18b50ed64ea56972719472d31896291bc8128 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 19 Jul 2019 18:36:20 +0800 Subject: [PATCH 04/54] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...fy_request_limit_for_shixun_service_config.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/db/migrate/20190626161150_modify_request_limit_for_shixun_service_config.rb b/db/migrate/20190626161150_modify_request_limit_for_shixun_service_config.rb index 060cad94..3cab9b73 100644 --- a/db/migrate/20190626161150_modify_request_limit_for_shixun_service_config.rb +++ b/db/migrate/20190626161150_modify_request_limit_for_shixun_service_config.rb @@ -1,13 +1,13 @@ class ModifyRequestLimitForShixunServiceConfig < ActiveRecord::Migration def up - ShixunServiceConfig.find_each do |config| - # repertoire_id = 5 代表的是大数据的镜像 - if config.mirror_repository.repertoire_id != 5 - config.update_column(:request_limit, 10) - else - puts("####---#{config.mirror_repository.name}") - end - end + # ShixunServiceConfig.find_each do |config| + # # repertoire_id = 5 代表的是大数据的镜像 + # if config.mirror_repository.repertoire_id != 5 + # config.update_column(:request_limit, 10) + # else + # puts("####---#{config.mirror_repository.name}") + # end + # end end def down From 7766f7bfecd902ab43834078908663616af78dfe Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 19 Jul 2019 18:37:43 +0800 Subject: [PATCH 05/54] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20190716073605_create_user_agents.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/db/migrate/20190716073605_create_user_agents.rb b/db/migrate/20190716073605_create_user_agents.rb index 22bc181e..1b2e6844 100644 --- a/db/migrate/20190716073605_create_user_agents.rb +++ b/db/migrate/20190716073605_create_user_agents.rb @@ -1,12 +1,12 @@ class CreateUserAgents < ActiveRecord::Migration def change - create_table :user_agents do |t| - t.string :type - t.string :key - t.string :ip - - t.timestamps - end - add_index(:user_agents, :ip, :unique => true) + # create_table :user_agents do |t| + # t.string :type + # t.string :key + # t.string :ip + # + # t.timestamps + # end + # add_index(:user_agents, :ip, :unique => true) end end From d5513dff4f95a1030242a3c3be3f63fbf943306a Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 19 Jul 2019 18:38:22 +0800 Subject: [PATCH 06/54] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20190718005920_modify_type_for_user_agents.rb | 2 +- db/migrate/20190719062616_add_ip_for_user_actions.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/db/migrate/20190718005920_modify_type_for_user_agents.rb b/db/migrate/20190718005920_modify_type_for_user_agents.rb index 72d4f99b..4d9587ec 100644 --- a/db/migrate/20190718005920_modify_type_for_user_agents.rb +++ b/db/migrate/20190718005920_modify_type_for_user_agents.rb @@ -1,6 +1,6 @@ class ModifyTypeForUserAgents < ActiveRecord::Migration def up - rename_column :user_agents, :type, :agent_type + # rename_column :user_agents, :type, :agent_type end def down diff --git a/db/migrate/20190719062616_add_ip_for_user_actions.rb b/db/migrate/20190719062616_add_ip_for_user_actions.rb index d1297176..59b41dee 100644 --- a/db/migrate/20190719062616_add_ip_for_user_actions.rb +++ b/db/migrate/20190719062616_add_ip_for_user_actions.rb @@ -1,8 +1,8 @@ class AddIpForUserActions < ActiveRecord::Migration def up - add_column :user_actions, :ip, :string - - UserAgent.where("agent_type is null").update_all(:agent_type => 1) + # add_column :user_actions, :ip, :string + # + # UserAgent.where("agent_type is null").update_all(:agent_type => 1) end def down From be800816238fb764b8d4851a910f818c3db37ec3 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 19 Jul 2019 18:39:17 +0800 Subject: [PATCH 07/54] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20190719062616_add_ip_for_user_actions.rb | 10 ---------- db/migrate/20190719062617_add_ip_for_user_actions.rb | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 db/migrate/20190719062616_add_ip_for_user_actions.rb create mode 100644 db/migrate/20190719062617_add_ip_for_user_actions.rb diff --git a/db/migrate/20190719062616_add_ip_for_user_actions.rb b/db/migrate/20190719062616_add_ip_for_user_actions.rb deleted file mode 100644 index 59b41dee..00000000 --- a/db/migrate/20190719062616_add_ip_for_user_actions.rb +++ /dev/null @@ -1,10 +0,0 @@ -class AddIpForUserActions < ActiveRecord::Migration - def up - # add_column :user_actions, :ip, :string - # - # UserAgent.where("agent_type is null").update_all(:agent_type => 1) - end - - def down - end -end diff --git a/db/migrate/20190719062617_add_ip_for_user_actions.rb b/db/migrate/20190719062617_add_ip_for_user_actions.rb new file mode 100644 index 00000000..d1297176 --- /dev/null +++ b/db/migrate/20190719062617_add_ip_for_user_actions.rb @@ -0,0 +1,10 @@ +class AddIpForUserActions < ActiveRecord::Migration + def up + add_column :user_actions, :ip, :string + + UserAgent.where("agent_type is null").update_all(:agent_type => 1) + end + + def down + end +end From 5551a1ae3b74af043fb95b571481b4e537c929ef Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 19 Jul 2019 18:41:09 +0800 Subject: [PATCH 08/54] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...626064125_create_shixun_service_configs.rb | 20 ++++++------- .../20190626070641_add_limit_for_shixuns.rb | 28 +++++++++---------- ...request_limit_for_shixun_service_config.rb | 16 +++++------ .../20190716073605_create_user_agents.rb | 16 +++++------ ...90718005920_modify_type_for_user_agents.rb | 2 +- ...20190719062616_add_ip_for_user_actions.rb} | 0 6 files changed, 41 insertions(+), 41 deletions(-) rename db/migrate/{20190719062617_add_ip_for_user_actions.rb => 20190719062616_add_ip_for_user_actions.rb} (100%) diff --git a/db/migrate/20190626064125_create_shixun_service_configs.rb b/db/migrate/20190626064125_create_shixun_service_configs.rb index bb4a150c..a15a30f6 100644 --- a/db/migrate/20190626064125_create_shixun_service_configs.rb +++ b/db/migrate/20190626064125_create_shixun_service_configs.rb @@ -1,14 +1,14 @@ class CreateShixunServiceConfigs < ActiveRecord::Migration def change - # create_table :shixun_service_configs do |t| - # t.references :shixun - # t.integer :cpu_limit, :default => 1 - # t.integer :memory_limit, :default => 1024 - # t.integer :request_limit, :default => 10 - # t.float :lower_cpu_limit, :default => 0.1 - # t.integer :resource_limit, :default => 10000 - # t.references :mirror_repository - # t.timestamps - # end + create_table :shixun_service_configs do |t| + t.references :shixun + t.integer :cpu_limit, :default => 1 + t.integer :memory_limit, :default => 1024 + t.integer :request_limit, :default => 10 + t.float :lower_cpu_limit, :default => 0.1 + t.integer :resource_limit, :default => 10000 + t.references :mirror_repository + t.timestamps + end end end diff --git a/db/migrate/20190626070641_add_limit_for_shixuns.rb b/db/migrate/20190626070641_add_limit_for_shixuns.rb index e8ba1679..e403c061 100644 --- a/db/migrate/20190626070641_add_limit_for_shixuns.rb +++ b/db/migrate/20190626070641_add_limit_for_shixuns.rb @@ -1,19 +1,19 @@ class AddLimitForShixuns < ActiveRecord::Migration def up - # if !Challenge.first.has_attribute?(:exec_time) - # add_column :challenges, :exec_time, :integer, :default => 120 - # end - # Shixun.find_each do |shixun| - # shixun.challenges.update_all(:exec_time => shixun.exec_time) - # shixun.mirror_repositories.each do |mirror| - # ShixunServiceConfig.create!(:shixun_id => shixun.id, - # :cpu_limit => mirror.cpu_limit, - # :memory_limit => mirror.memory_limit, - # :request_limit => mirror.memory_limit / 3, - # :mirror_repository_id => mirror.id) - # end - # end - # + if !Challenge.first.has_attribute?(:exec_time) + add_column :challenges, :exec_time, :integer, :default => 120 + end + Shixun.find_each do |shixun| + shixun.challenges.update_all(:exec_time => shixun.exec_time) + shixun.mirror_repositories.each do |mirror| + ShixunServiceConfig.create!(:shixun_id => shixun.id, + :cpu_limit => mirror.cpu_limit, + :memory_limit => mirror.memory_limit, + :request_limit => mirror.memory_limit / 3, + :mirror_repository_id => mirror.id) + end + end + end diff --git a/db/migrate/20190626161150_modify_request_limit_for_shixun_service_config.rb b/db/migrate/20190626161150_modify_request_limit_for_shixun_service_config.rb index 3cab9b73..060cad94 100644 --- a/db/migrate/20190626161150_modify_request_limit_for_shixun_service_config.rb +++ b/db/migrate/20190626161150_modify_request_limit_for_shixun_service_config.rb @@ -1,13 +1,13 @@ class ModifyRequestLimitForShixunServiceConfig < ActiveRecord::Migration def up - # ShixunServiceConfig.find_each do |config| - # # repertoire_id = 5 代表的是大数据的镜像 - # if config.mirror_repository.repertoire_id != 5 - # config.update_column(:request_limit, 10) - # else - # puts("####---#{config.mirror_repository.name}") - # end - # end + ShixunServiceConfig.find_each do |config| + # repertoire_id = 5 代表的是大数据的镜像 + if config.mirror_repository.repertoire_id != 5 + config.update_column(:request_limit, 10) + else + puts("####---#{config.mirror_repository.name}") + end + end end def down diff --git a/db/migrate/20190716073605_create_user_agents.rb b/db/migrate/20190716073605_create_user_agents.rb index 1b2e6844..22bc181e 100644 --- a/db/migrate/20190716073605_create_user_agents.rb +++ b/db/migrate/20190716073605_create_user_agents.rb @@ -1,12 +1,12 @@ class CreateUserAgents < ActiveRecord::Migration def change - # create_table :user_agents do |t| - # t.string :type - # t.string :key - # t.string :ip - # - # t.timestamps - # end - # add_index(:user_agents, :ip, :unique => true) + create_table :user_agents do |t| + t.string :type + t.string :key + t.string :ip + + t.timestamps + end + add_index(:user_agents, :ip, :unique => true) end end diff --git a/db/migrate/20190718005920_modify_type_for_user_agents.rb b/db/migrate/20190718005920_modify_type_for_user_agents.rb index 4d9587ec..72d4f99b 100644 --- a/db/migrate/20190718005920_modify_type_for_user_agents.rb +++ b/db/migrate/20190718005920_modify_type_for_user_agents.rb @@ -1,6 +1,6 @@ class ModifyTypeForUserAgents < ActiveRecord::Migration def up - # rename_column :user_agents, :type, :agent_type + rename_column :user_agents, :type, :agent_type end def down diff --git a/db/migrate/20190719062617_add_ip_for_user_actions.rb b/db/migrate/20190719062616_add_ip_for_user_actions.rb similarity index 100% rename from db/migrate/20190719062617_add_ip_for_user_actions.rb rename to db/migrate/20190719062616_add_ip_for_user_actions.rb From 457546c804df3408f8429c7620c11ab60b67b4a8 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 19 Jul 2019 19:06:56 +0800 Subject: [PATCH 09/54] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/update.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/update.html b/public/update.html index e609e7aa..18c1c436 100644 --- a/public/update.html +++ b/public/update.html @@ -56,7 +56,7 @@ If you continue to experience problems please contact your Trustie administrator 温馨提示:为了给大家提供更优质的服务

- 平台拟于2019年4月27日17:00--18:30进行全面升级,带来不便,敬请谅解! + 平台拟于2019年7月19日21:30--2019年7月20号12:00进行全面升级,带来不便,敬请谅解!

From d9590c1196d492c78176890873ae820e625b0b23 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 19 Jul 2019 21:31:12 +0800 Subject: [PATCH 10/54] =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/update.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/update.html b/public/update.html index 18c1c436..f02cd46b 100644 --- a/public/update.html +++ b/public/update.html @@ -51,7 +51,7 @@ If you continue to experience problems please contact your Trustie administrator

If you are the Trustie administrator, check your log files for details about the error.

-->
- +

温馨提示:为了给大家提供更优质的服务

From 727ed3781c10ce74819601cffbcb5026161a068e Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sat, 20 Jul 2019 01:44:21 +0800 Subject: [PATCH 11/54] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/update.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/update.html b/public/update.html index f02cd46b..f255ad3e 100644 --- a/public/update.html +++ b/public/update.html @@ -56,7 +56,7 @@ If you continue to experience problems please contact your Trustie administrator 温馨提示:为了给大家提供更优质的服务

- 平台拟于2019年7月19日21:30--2019年7月20号12:00进行全面升级,带来不便,敬请谅解! + 平台拟于2019年7月19日21:30--2019年7月20号16:00进行全面升级,带来不便,敬请谅解!

From dda58619fcf378da58108615c0edd1b2c355d4dd Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sat, 20 Jul 2019 15:56:32 +0800 Subject: [PATCH 12/54] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/update.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/update.html b/public/update.html index f255ad3e..8c5264fe 100644 --- a/public/update.html +++ b/public/update.html @@ -56,7 +56,7 @@ If you continue to experience problems please contact your Trustie administrator 温馨提示:为了给大家提供更优质的服务

- 平台拟于2019年7月19日21:30--2019年7月20号16:00进行全面升级,带来不便,敬请谅解! + 平台拟于2019年7月19日21:30--2019年7月20号20:00进行全面升级,带来不便,敬请谅解!

From 68d8f10482610c68fcdf6973594e06748e135425 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Sat, 20 Jul 2019 16:01:07 +0800 Subject: [PATCH 13/54] competition modify --- app/controllers/managements_controller.rb | 6 ++ app/models/competition_text_config.rb | 2 +- .../_qg_second_opensource.html.erb | 99 ++++++++++--------- .../_competition_list_page.html.erb | 25 ++++- config/routes.rb | 2 + ...0074324_change_competition_text_configs.rb | 8 ++ 6 files changed, 90 insertions(+), 52 deletions(-) create mode 100644 db/migrate/20190720074324_change_competition_text_configs.rb diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 156ae951..6a377933 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -1133,6 +1133,12 @@ end render :json => {:status => 1} end + def update_competition_text + text = CompetitionTextConfig.find(params[:id]) + text.update_attributes(name: params[:name], description: params[:description]) + render :json => {:status => 1} + end + def delete_competition_text ctc = CompetitionTextConfig.find params[:id] ctc.destroy diff --git a/app/models/competition_text_config.rb b/app/models/competition_text_config.rb index 25ddb28e..436818bf 100644 --- a/app/models/competition_text_config.rb +++ b/app/models/competition_text_config.rb @@ -1,4 +1,4 @@ class CompetitionTextConfig < ActiveRecord::Base - # attr_accessible :title, :body + attr_accessible :name, :description, :competition_id belongs_to :competition end diff --git a/app/views/competitions/_qg_second_opensource.html.erb b/app/views/competitions/_qg_second_opensource.html.erb index 3b88b612..ddaad572 100644 --- a/app/views/competitions/_qg_second_opensource.html.erb +++ b/app/views/competitions/_qg_second_opensource.html.erb @@ -4,71 +4,59 @@
<% index += 1 %> - -
-
-

- 为推动我国基于开源的开放创新生态环境建设,加快面向自主创新的高校信息技术新工科人才培养模式变革,大力培养实践能力强、创新能力强、具备国际竞争力的信息技术领域高素质人才,教育部高等学校计算机类专业教学指导委员会、教育部高等学校软件工程专业教学指导委员会、全国高等学校计算机教育研究会。 - - 创新能力强、具备国际竞争力的信息技术领域高素质人才,教育部高等学校计算机类专业教学指导委员会、教育部高等学校软件工程专业教学指导委员会、全国高等学校计算机教育研究会、信息技术新工科产学研联盟、中国计算机学会软件工程专委会、中国计算机学会系统软件专委会、绿色计算产业联盟等共同研究,决定举办第二届全国高校绿色计算创新大赛。 -

-
-
- -
-
- +
+
+

+ <%= @competition.competition_text_configs.first.try(:description) %> +

+<% index += 1 %> -<% @competition.competition_stages.each_with_index do |stage, i| %> -
- <% - first_section = stage.competition_stage_sections[0] - second_section = stage.competition_stage_sections[1] - %> -
-
    -

    - - <%= first_section.try(:name) %> - <%= first_section.start_time.try(:strftime, '%Y年%m月%d日') %>~<%= first_section.end_time.try(:strftime, '%Y年%m月%d日') %> - - - <%= second_section.try(:name) %> - <%= second_section.try(:start_time).try(:strftime, '%Y年%m月%d日') %>~<%= second_section.try(:end_time).try(:strftime, '%Y年%m月%d日') %> - -

    -
  • - <% is_start = Time.now > first_section.start_time %> - <% first_section.competition_entries.each_with_index do |entry, j| %> - <% - competition_url = User.current.logged? ? "#{entry.url}?eid=#{User.current.id}" : "#{entry.url}" - btn_url = is_start ? "#{competition_url}" : "javascript:void(0);" - %> - <%= entry.name %> - <% end %> -
  • -
+<% + first_stage = @competition.competition_stages.first + first_section = first_stage.competition_stage_sections.first + first_entry = first_section.competition_entries.first + is_start = Time.now > first_section.start_time + competition_url = User.current.logged? ? "#{first_entry.url}?eid=#{User.current.id}" : "#{first_entry.url}" + btn_url = is_start ? "#{competition_url}" : "javascript:void(0);" +%> +
+
+
<% index += 1 %> -<% end %>
<% index += 1 %>
<% index += 1 %>
+<% index += 1 %> +