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 %> +
  • <%= sidebar_item(admins_competitions_path, '竞赛', icon: 'trophy', controller: 'admins-competitions') %>
  • +
  • <%= sidebar_item_group('#setting-submenu', '网站建设', icon: 'cogs') do %>
  • <%= sidebar_item(admins_carousels_path, '轮播图', icon: 'image', controller: 'admins-carousels') %>
  • diff --git a/config/routes.rb b/config/routes.rb index 32725e8e9..f6f8db066 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -980,6 +980,8 @@ Rails.application.routes.draw do resource :laboratory_setting, only: [:show, :update] resource :laboratory_user, only: [:create, :destroy] end + + resources :competitions, only: [:index, :destroy] end resources :colleges, only: [] do From 3642ed35cb17e517ac01e941e9c29c87cd9ff27e Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 15 Oct 2019 16:08:37 +0800 Subject: [PATCH 04/21] =?UTF-8?q?=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/members/studentsList.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index 33d434329..3d8f814ef 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -330,6 +330,7 @@ class studentsList extends Component{ } updateNavSuccess = () => { this.fetchCourseGroups() + this.fetchAll() } addStudentSuccessListener=(e, data)=>{ @@ -682,12 +683,13 @@ class studentsList extends Component{ if (this.props.match.path.endsWith('students')) { } else if (course_group_id) { - pageType = TYPE_COURSE_GOURP_PARENT - } else { pageType = TYPE_COURSE_GOURP_CHILD + } else { + pageType = TYPE_COURSE_GOURP_PARENT } const isStudentPage = pageType == TYPE_STUDENTS this.isStudentPage = isStudentPage + const isGroupChildPage = pageType == TYPE_COURSE_GOURP_CHILD return( @@ -700,7 +702,12 @@ class studentsList extends Component{ - {course_group_name || '未分班'} + + + { this.props.history.push(`/courses/${coursesids}/course_groups`)}} + style={{color: '#212121', verticalAlign: 'initial', marginRight: '14px' }} + > + {course_group_name || '未分班'} {isAdmin && invite_code && 邀请码: From 15b84106ecf73e7c797a5e80a90a58e0b8d52461 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 15 Oct 2019 16:09:18 +0800 Subject: [PATCH 05/21] =?UTF-8?q?left=5Fbanner=E4=B8=8D=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=88=86=E7=8F=AD=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/left_banner.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/courses/left_banner.json.jbuilder b/app/views/courses/left_banner.json.jbuilder index 681145769..f3b80b4f5 100644 --- a/app/views/courses/left_banner.json.jbuilder +++ b/app/views/courses/left_banner.json.jbuilder @@ -11,7 +11,7 @@ json.course_modules @course_modules.each do |mod| case mod.module_type when "course_group" # json.none_group_count @course.none_group_count - json.second_category left_group_info @course + # json.second_category left_group_info @course when "board" course_board = @course.course_board if course_board.present? From cb188f65e7c836d8ce65d67edc2b372d5ad0c25b Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 15 Oct 2019 16:20:06 +0800 Subject: [PATCH 06/21] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/members/studentsList.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index 3d8f814ef..db18f9c8e 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -589,15 +589,15 @@ class studentsList extends Component{
    是否确认删除?
    , onOk: () => { - // const cid = this.props.match.params.coursesId const course_group_id = this.props.match.params.course_group_id + const courseId = this.props.match.params.coursesId const url = `/course_groups/${course_group_id}.json` axios.delete(url) .then((response) => { if (response.data.status == 0) { this.props.showNotification('删除成功') - this.props.history.push(response.data.right_url) + this.props.history.push(`/courses/${coursesId}/course_groups`) } }) .catch(function (error) { From 7a1a05e0dfda3bd1c03e7a4af9beff01fbbc257b Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 15 Oct 2019 16:31:16 +0800 Subject: [PATCH 07/21] isStudentPage --- public/react/src/modules/courses/members/studentsList.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index db18f9c8e..15fe7d392 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -107,7 +107,7 @@ const buildColumns = (that,isParent) => { } ]; if (course_groups && course_groups.length) { - columns.push({ + this.isStudentPage && columns.push({ title: '分班', dataIndex: 'course_group_name', key: 'course_group_name', @@ -687,6 +687,7 @@ class studentsList extends Component{ } else { pageType = TYPE_COURSE_GOURP_PARENT } + // 本页面有2个状态,学生列表、具体分班 const isStudentPage = pageType == TYPE_STUDENTS this.isStudentPage = isStudentPage const isGroupChildPage = pageType == TYPE_COURSE_GOURP_CHILD From 684e38e42e76ffc5d9d86964291bd3ea370ab774 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 15 Oct 2019 16:33:04 +0800 Subject: [PATCH 08/21] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=88=86=E7=8F=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/members/CourseGroupChooser.js | 2 +- public/react/src/modules/courses/members/studentsList.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/members/CourseGroupChooser.js b/public/react/src/modules/courses/members/CourseGroupChooser.js index 125f10b51..655754dc4 100644 --- a/public/react/src/modules/courses/members/CourseGroupChooser.js +++ b/public/react/src/modules/courses/members/CourseGroupChooser.js @@ -89,7 +89,7 @@ function CourseGroupChooser({ course_groups, isAdminOrCreator = true, item, inde

    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} >
    -
    + {!!none_group_member_count &&
    未分班: {none_group_member_count}个学生 {props.history.push(`/courses/${courseId}/course_groups/0`)}}>查看 -
    +
    } {course_groups && !!course_groups.length ? diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index 61e8945c7..3e896c628 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -805,7 +805,7 @@ class studentsList extends Component{ { total_count > 0 || this.state.isSpin == true ?
    -
    +
    {isAdmin && !isStudentPage && 已选 {checkBoxValues.length} 个}
    {/* {isAdmin &&
  • 删除
  • } */} From 779025c45255794a32a9fd78a71c0ee46ee3009f Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 15 Oct 2019 16:46:18 +0800 Subject: [PATCH 10/21] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E7=AE=80=E4=BB=8B=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/homework_commons/show.json.jbuilder | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/homework_commons/show.json.jbuilder b/app/views/homework_commons/show.json.jbuilder index 8d5abc8bc..74b60af48 100644 --- a/app/views/homework_commons/show.json.jbuilder +++ b/app/views/homework_commons/show.json.jbuilder @@ -4,11 +4,12 @@ json.partial! "homework_btn_check", locals: {identity: @user_course_identity, ho json.partial! "student_btn_check", locals: {identity: @user_course_identity, homework: @homework, work: @work} +json.description @homework.description # 实训作业才有说明 if @homework.homework_type == "practice" json.explanation @homework.explanation -else - json.description @homework.description +# else +# json.description @homework.description end # 附件 From c79e40d2756aca9494d1824e61bafce94924713d Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 15 Oct 2019 16:52:12 +0800 Subject: [PATCH 11/21] marginLeft --- public/react/src/modules/courses/members/ChangeRolePop.js | 2 +- public/react/src/modules/courses/members/studentsList.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/members/ChangeRolePop.js b/public/react/src/modules/courses/members/ChangeRolePop.js index d81c6db46..455e851ee 100644 --- a/public/react/src/modules/courses/members/ChangeRolePop.js +++ b/public/react/src/modules/courses/members/ChangeRolePop.js @@ -75,7 +75,7 @@ function ChangeRolePop({ member_roles = [], record, courseId, onChangeRoleSucces } > - 修改角色 + 修改角色 ) } diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index 3e896c628..1f6bf9096 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -148,8 +148,9 @@ const buildColumns = (that,isParent) => { render: (text, record) => { return ( - that.onDelete(record)} style={'grey'}>删除学生 + that.onDelete(record)} style={'grey'}>删除学生 {record.member_roles && record.member_roles.length && Date: Tue, 15 Oct 2019 16:54:05 +0800 Subject: [PATCH 12/21] marginRight --- .../react/src/modules/courses/members/CourseGroupListTable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/members/CourseGroupListTable.js b/public/react/src/modules/courses/members/CourseGroupListTable.js index 1560183f5..656ae67bc 100644 --- a/public/react/src/modules/courses/members/CourseGroupListTable.js +++ b/public/react/src/modules/courses/members/CourseGroupListTable.js @@ -134,7 +134,7 @@ function CourseGroupListTable(props) { {isAdmin && 复制邀请码 } {isStudent && addToDir(record)} style={''}>加入分班} - onGoDetail(record)} style={''}>查看 + onGoDetail(record)} style={''}>查看 } }) From 45f337e66fb2ed11ea1240c5fc689379eb42820b Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 15 Oct 2019 17:08:29 +0800 Subject: [PATCH 13/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 --- .../admins/competitions_controller.rb | 11 ++++++- app/views/admins/competitions/index.html.erb | 32 +++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 app/views/admins/competitions/index.html.erb diff --git a/app/controllers/admins/competitions_controller.rb b/app/controllers/admins/competitions_controller.rb index 0e17993da..3d6bef819 100644 --- a/app/controllers/admins/competitions_controller.rb +++ b/app/controllers/admins/competitions_controller.rb @@ -1,6 +1,15 @@ -class Admins::CompetitionController < Admins::BaseController +class Admins::CompetitionsController < Admins::BaseController def index + params[:sort_by] = params[:sort_by].presence || 'created_on' + params[:sort_direction] = params[:sort_direction].presence || 'desc' + @competitions = custom_sort Competition.all, params[:sort_by], params[:sort_direction] + @params_page = params[:page] || 1 + @competitions = paginate @competitions + respond_to do |format| + format.js + format.html + end end end \ No newline at end of file diff --git a/app/views/admins/competitions/index.html.erb b/app/views/admins/competitions/index.html.erb new file mode 100644 index 000000000..adcee53b1 --- /dev/null +++ b/app/views/admins/competitions/index.html.erb @@ -0,0 +1,32 @@ +<% define_admin_breadcrumbs do %> + <% add_admin_breadcrumb('竞赛列表', admins_competitions_path) %> +<% end %> + +
    + <%= form_tag(admins_shixuns_path, method: :get, class: 'form-inline search-form',id:"shixuns-search-form",remote:true) do %> +
    + + <% status_options = [['全部', ''], ["编辑中(#{@editing_shixuns})", "editing"], ["待审核(#{@pending_shixuns})", 'pending'], ["已发布(#{@processed_shixuns})", 'processed'],["已关闭(#{@closed_shixuns})",'closed']] %> + <%= select_tag(:status, options_for_select(status_options), class: 'form-control') %> +
    + +
    + + <%= select_tag(:tag, options_for_select(@shixuns_type_check.unshift(["",nil])), class: 'form-control',id:"tag-choosed") %> +
    + +
    + + <% auto_trial_options = [['创建者姓名', 0], ['实训名称', 1], ['学校名称', 2]] %> + <%= select_tag(:search_type, options_for_select(auto_trial_options), class: 'form-control') %> +
    + <%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-sm-2 ml-3', placeholder: '输入关键字搜索') %> + <%= submit_tag('搜索', class: 'btn btn-primary ml-3','data-disable-with': '搜索中...') %> + <%= link_to "清除",admins_shixuns_path,class: "btn btn-default",id:"shixuns-clear-search",'data-disable-with': '清除中...' %> + <% end %> + 导出 +
    + +
    + <%= render partial: 'admins/shixuns/shared/list', locals: { shixuns: @shixuns } %> +
    From cc96158acc8bce19660930bbfcbe82e775b1fcd9 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 15 Oct 2019 17:13:55 +0800 Subject: [PATCH 14/21] =?UTF-8?q?=E5=8A=A9=E6=95=99=E6=9D=83=E9=99=90?= =?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/controllers/boards_controller.rb | 2 +- app/controllers/course_groups_controller.rb | 2 +- app/controllers/course_second_categories_controller.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 1081a82ce..2bcc8d8f6 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -2,7 +2,7 @@ class BoardsController < ApplicationController before_action :require_login, :check_auth before_action :find_course, only: [:create] before_action :set_board, except: [:create] - before_action :teacher_or_admin_allowed + before_action :teacher_allowed def index @boards = @course.boards.includes(messages: [:last_reply, :author]) diff --git a/app/controllers/course_groups_controller.rb b/app/controllers/course_groups_controller.rb index 0e16d1bac..bfdb959b4 100644 --- a/app/controllers/course_groups_controller.rb +++ b/app/controllers/course_groups_controller.rb @@ -2,7 +2,7 @@ class CourseGroupsController < ApplicationController before_action :require_login, :check_auth before_action :set_group, except: [:create] before_action :find_course, only: [:create] - before_action :teacher_or_admin_allowed + before_action :teacher_allowed def create tip_exception("分班名称不能为空") if params[:name].blank? diff --git a/app/controllers/course_second_categories_controller.rb b/app/controllers/course_second_categories_controller.rb index e5c3366cd..2de1637f2 100644 --- a/app/controllers/course_second_categories_controller.rb +++ b/app/controllers/course_second_categories_controller.rb @@ -1,7 +1,7 @@ class CourseSecondCategoriesController < ApplicationController before_action :require_login, :check_auth before_action :set_category - before_action :teacher_or_admin_allowed + before_action :teacher_allowed # 目录重命名 def rename_category From 5a4d225c7029d4eae9016dcc960cb78060ccece6 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 15 Oct 2019 17:19:42 +0800 Subject: [PATCH 15/21] no message --- public/react/src/modules/courses/members/studentsList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index 1f6bf9096..1cee6051e 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -706,7 +706,7 @@ class studentsList extends Component{ - { this.props.history.push(`/courses/${coursesids}/course_groups`)}} + { this.props.history.push(`/courses/${courseId}/course_groups`)}} style={{color: '#212121', verticalAlign: 'initial', marginRight: '14px' }} > {course_group_name || '未分班'} From da2bf0bbad1449267c14f9f3b5645087cce83816 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 15 Oct 2019 17:23:58 +0800 Subject: [PATCH 16/21] =?UTF-8?q?=E5=8A=A9=E6=95=99=E6=9D=83=E9=99=90?= =?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/views/admins/competitions/index.html.erb | 27 +------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/app/views/admins/competitions/index.html.erb b/app/views/admins/competitions/index.html.erb index adcee53b1..8fa238181 100644 --- a/app/views/admins/competitions/index.html.erb +++ b/app/views/admins/competitions/index.html.erb @@ -2,31 +2,6 @@ <% add_admin_breadcrumb('竞赛列表', admins_competitions_path) %> <% end %> -
    - <%= form_tag(admins_shixuns_path, method: :get, class: 'form-inline search-form',id:"shixuns-search-form",remote:true) do %> -
    - - <% status_options = [['全部', ''], ["编辑中(#{@editing_shixuns})", "editing"], ["待审核(#{@pending_shixuns})", 'pending'], ["已发布(#{@processed_shixuns})", 'processed'],["已关闭(#{@closed_shixuns})",'closed']] %> - <%= select_tag(:status, options_for_select(status_options), class: 'form-control') %> -
    - -
    - - <%= select_tag(:tag, options_for_select(@shixuns_type_check.unshift(["",nil])), class: 'form-control',id:"tag-choosed") %> -
    - -
    - - <% auto_trial_options = [['创建者姓名', 0], ['实训名称', 1], ['学校名称', 2]] %> - <%= select_tag(:search_type, options_for_select(auto_trial_options), class: 'form-control') %> -
    - <%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-sm-2 ml-3', placeholder: '输入关键字搜索') %> - <%= submit_tag('搜索', class: 'btn btn-primary ml-3','data-disable-with': '搜索中...') %> - <%= link_to "清除",admins_shixuns_path,class: "btn btn-default",id:"shixuns-clear-search",'data-disable-with': '清除中...' %> - <% end %> - 导出 -
    - -
    +
    <%= render partial: 'admins/shixuns/shared/list', locals: { shixuns: @shixuns } %>
    From 2dbd9d993e16d6502d7c7846132d7a863b391340 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 15 Oct 2019 17:25:11 +0800 Subject: [PATCH 17/21] courseId --- public/react/src/modules/courses/members/studentsList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index 1cee6051e..20ab384f1 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -598,7 +598,7 @@ class studentsList extends Component{ .then((response) => { if (response.data.status == 0) { this.props.showNotification('删除成功') - this.props.history.push(`/courses/${coursesId}/course_groups`) + this.props.history.push(`/courses/${courseId}/course_groups`) } }) .catch(function (error) { From bf97b69a8b29a882b439e7457f87006965587626 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 15 Oct 2019 17:27:39 +0800 Subject: [PATCH 18/21] mr30 --- public/react/src/modules/courses/members/studentsList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index 20ab384f1..ffdb9ed59 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -751,7 +751,7 @@ class studentsList extends Component{ !isStudentPage && !isCourseEnd && isAdmin && this.addDir()}>新建分班 } { - !isStudentPage && isStudent && !isParent && course_group_id != 0 && this.addToDir()}>加入分班 } + !isStudentPage && isStudent && !isParent && course_group_id != 0 && this.addToDir()}>加入分班 }