From 89782ffabde12b3d07db370305d86e275b5fe853 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 14 Oct 2019 16:04:24 +0800 Subject: [PATCH 01/21] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/competitions/competitions/index.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/competitions/competitions/index.json.jbuilder b/app/views/competitions/competitions/index.json.jbuilder index f0d70f69e..400f17379 100644 --- a/app/views/competitions/competitions/index.json.jbuilder +++ b/app/views/competitions/competitions/index.json.jbuilder @@ -20,7 +20,7 @@ json.competitions do if section json.current_stage do - json.name = section.competition_stage.name + json.name section.competition_stage.name json.start_time section.display_start_time json.end_time section.display_end_time end From f35bc5f18d06478b2d66247816067d1e9347bcff Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 15 Oct 2019 10:20:30 +0800 Subject: [PATCH 02/21] =?UTF-8?q?=E7=AB=9E=E8=B5=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/competition_mode_setting.rb | 3 +++ .../20191015013924_add_new_column_to_competitions.rb | 6 ++++++ ...20191015015723_create_competition_mode_settings.rb | 11 +++++++++++ spec/models/competition_mode_setting_spec.rb | 5 +++++ 4 files changed, 25 insertions(+) create mode 100644 app/models/competition_mode_setting.rb create mode 100644 db/migrate/20191015013924_add_new_column_to_competitions.rb create mode 100644 db/migrate/20191015015723_create_competition_mode_settings.rb create mode 100644 spec/models/competition_mode_setting_spec.rb diff --git a/app/models/competition_mode_setting.rb b/app/models/competition_mode_setting.rb new file mode 100644 index 000000000..b6bafa7c3 --- /dev/null +++ b/app/models/competition_mode_setting.rb @@ -0,0 +1,3 @@ +class CompetitionModeSetting < ApplicationRecord + belongs_to :course +end diff --git a/db/migrate/20191015013924_add_new_column_to_competitions.rb b/db/migrate/20191015013924_add_new_column_to_competitions.rb new file mode 100644 index 000000000..616a46059 --- /dev/null +++ b/db/migrate/20191015013924_add_new_column_to_competitions.rb @@ -0,0 +1,6 @@ +class AddNewColumnToCompetitions < ActiveRecord::Migration[5.2] + def change + add_column :competitions, :bonus, :integer, default: 0 + add_column :competitions, :mode, :integer, default: 0 + end +end diff --git a/db/migrate/20191015015723_create_competition_mode_settings.rb b/db/migrate/20191015015723_create_competition_mode_settings.rb new file mode 100644 index 000000000..5d170eeab --- /dev/null +++ b/db/migrate/20191015015723_create_competition_mode_settings.rb @@ -0,0 +1,11 @@ +class CreateCompetitionModeSettings < ActiveRecord::Migration[5.2] + def change + create_table :competition_mode_settings do |t| + t.references :course + t.datetime :start_time + t.datetime :end_time + + t.timestamps + end + end +end diff --git a/spec/models/competition_mode_setting_spec.rb b/spec/models/competition_mode_setting_spec.rb new file mode 100644 index 000000000..535767880 --- /dev/null +++ b/spec/models/competition_mode_setting_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe CompetitionModeSetting, type: :model do + pending "add some examples to (or delete) #{__FILE__}" +end From 2587be26b374f285677c92e60535a233b2a84e1e Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 15 Oct 2019 16:05:31 +0800 Subject: [PATCH 03/21] =?UTF-8?q?=E7=AB=9E=E8=B5=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/admins/competitions_controller.rb | 6 ++++++ app/views/admins/shared/_sidebar.html.erb | 2 ++ config/routes.rb | 2 ++ 3 files changed, 10 insertions(+) create mode 100644 app/controllers/admins/competitions_controller.rb diff --git a/app/controllers/admins/competitions_controller.rb b/app/controllers/admins/competitions_controller.rb new file mode 100644 index 000000000..0e17993da --- /dev/null +++ b/app/controllers/admins/competitions_controller.rb @@ -0,0 +1,6 @@ +class Admins::CompetitionController < Admins::BaseController + + def index + + end +end \ No newline at end of file diff --git a/app/views/admins/shared/_sidebar.html.erb b/app/views/admins/shared/_sidebar.html.erb index 145910928..ca6fb2a46 100644 --- a/app/views/admins/shared/_sidebar.html.erb +++ b/app/views/admins/shared/_sidebar.html.erb @@ -66,6 +66,8 @@ <% end %> +
trigger('groupAdd')} - >添加分班 + >新建分班
) diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index 15fe7d392..61e8945c7 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -836,7 +836,7 @@ class studentsList extends Component{this.addDir()} - >添加分班... + >新建分班...
} From 0a801217d1bbc28bebf8dda837903762c63155f2 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 15 Oct 2019 16:39:56 +0800 Subject: [PATCH 09/21] none_group_member_count --- public/react/src/modules/courses/members/CourseGroupList.js | 4 ++-- public/react/src/modules/courses/members/studentsList.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/members/CourseGroupList.js b/public/react/src/modules/courses/members/CourseGroupList.js index 664e0d95a..6c0e915cc 100644 --- a/public/react/src/modules/courses/members/CourseGroupList.js +++ b/public/react/src/modules/courses/members/CourseGroupList.js @@ -210,13 +210,13 @@ function CourseGroupList(props) { onPressEnter={onPressEnter} >