From 9000ee2a3d2647f6de751942983b8e35455b2351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 7 Sep 2019 15:11:41 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/groupjobbank/GroupPackage2.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/groupjobbank/GroupPackage2.js b/public/react/src/modules/courses/groupjobbank/GroupPackage2.js index da48f3404..f6fa8361a 100644 --- a/public/react/src/modules/courses/groupjobbank/GroupPackage2.js +++ b/public/react/src/modules/courses/groupjobbank/GroupPackage2.js @@ -82,11 +82,16 @@ class GroupPackage extends Component {

} { - datas&&datas.group_info&&datas.group_info.base_on_project? + datas&&datas.group_info&&datas.group_info.base_on_project===1?

基于项目实施 (学生必须在本平台创建项目,项目管理员可以提交作品)

+ :datas&&datas.group_info&&datas.group_info.base_on_project===0? +

+ 基于项目实施 + (无需在平台创建项目,任意小组成员均可以提交作品) +

:"" } From cbf8412a3cffbf35e018f1791601e16f6ebde921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 7 Sep 2019 15:26:41 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=A2=9E=E5=8A=A0tpi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/ShixunWorkReport.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index d5ab535e2..5c90d07fe 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -395,7 +395,10 @@ class ShixunWorkReport extends Component {
通关时间: {data&&data.passed_time===null||data&&data.passed_time=== "--"?'--':moment(data&&data.passed_time).format('YYYY-MM-DD HH:mm')}
-
实战耗时: {data&&data.time_consuming===null?'--':data&&data.time_consuming}
+
实战耗时: + 学员在EduCoder做实训花费的时间 +
}>{data&&data.time_consuming===null?'--': + data&&data.time_consuming}

From b7dee6bf82756d89bb30511c0e69c07c139e42b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 7 Sep 2019 15:28:52 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=A2=9E=E5=8A=A0tpi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/ShixunWorkReport.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index 5c90d07fe..d5ab535e2 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -395,10 +395,7 @@ class ShixunWorkReport extends Component {
通关时间: {data&&data.passed_time===null||data&&data.passed_time=== "--"?'--':moment(data&&data.passed_time).format('YYYY-MM-DD HH:mm')}
-
实战耗时: - 学员在EduCoder做实训花费的时间 -
}>{data&&data.time_consuming===null?'--': - data&&data.time_consuming} +
实战耗时: {data&&data.time_consuming===null?'--':data&&data.time_consuming}

From 0620ef3d536fc141fe5d04d6c27517b702b9cb28 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 7 Sep 2019 15:32:51 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E5=9F=BA=E4=BA=8E=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=AE=9E=E6=96=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/busyWork/NewWorkForm.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/react/src/modules/courses/busyWork/NewWorkForm.js b/public/react/src/modules/courses/busyWork/NewWorkForm.js index 6083252bc..1626c5c6a 100644 --- a/public/react/src/modules/courses/busyWork/NewWorkForm.js +++ b/public/react/src/modules/courses/busyWork/NewWorkForm.js @@ -450,6 +450,7 @@ class NewWorkForm extends Component{ className="AboutInputForm groupSetting" > {getFieldDecorator('personNum', { + validateTrigger: 'onNone', rules: [{ // required: true, // message: '人数不能为空' From 9c435c2aec8116ab74f0fa407d6b3af9309219f5 Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Sat, 7 Sep 2019 15:35:57 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/common/ModalWrapper.js | 2 +- .../modules/courses/members/CourseGroupChooser.js | 2 +- .../members/modal/CourseGroupChooserModal.js | 14 +++++++++++++- .../react/src/modules/user/usersInfo/usersInfo.css | 4 ---- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/courses/common/ModalWrapper.js b/public/react/src/modules/courses/common/ModalWrapper.js index 44495d336..e92a508d6 100644 --- a/public/react/src/modules/courses/common/ModalWrapper.js +++ b/public/react/src/modules/courses/common/ModalWrapper.js @@ -53,7 +53,7 @@ class ModalWrapper extends Component{ {this.props.checkBoxValuestype===true?
请先选择课堂
:""} -
+
{ cancelText || '取消' } { okText || "确定" }
diff --git a/public/react/src/modules/courses/members/CourseGroupChooser.js b/public/react/src/modules/courses/members/CourseGroupChooser.js index f57874872..125f10b51 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/modal/CourseGroupChooserModal.js b/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js index 59883c77b..c0c11addc 100644 --- a/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js +++ b/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js @@ -65,16 +65,22 @@ function CourseGroupChooserModal({ course_groups = [], isAdminOrCreator, item, i className="courseGroupChooserModal" > {/* */} diff --git a/public/react/src/modules/user/usersInfo/usersInfo.css b/public/react/src/modules/user/usersInfo/usersInfo.css index 2a72fcfd1..a0cd3ba21 100644 --- a/public/react/src/modules/user/usersInfo/usersInfo.css +++ b/public/react/src/modules/user/usersInfo/usersInfo.css @@ -227,10 +227,6 @@ left:0px; background: #4CACFF; } -.square-Item{ - height: 295px; -} - /* 题库相关 */ .breadcrumb{ height: 18px; From 40bf50d9dac161d40c034e2369d40b0eac69669f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 7 Sep 2019 15:59:09 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=89=88=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/groupjobbank/GroupPackage2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/groupjobbank/GroupPackage2.js b/public/react/src/modules/courses/groupjobbank/GroupPackage2.js index f6fa8361a..7f593c353 100644 --- a/public/react/src/modules/courses/groupjobbank/GroupPackage2.js +++ b/public/react/src/modules/courses/groupjobbank/GroupPackage2.js @@ -89,7 +89,7 @@ class GroupPackage extends Component {

:datas&&datas.group_info&&datas.group_info.base_on_project===0?

- 基于项目实施 + 不基于项目 (无需在平台创建项目,任意小组成员均可以提交作品)

:"" From d151ce46bb27742cea0be5731e587d4d7c99f631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 7 Sep 2019 16:06:29 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E5=85=AC=E5=91=8A=E6=A0=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/gradinforms/Bullsubdirectory.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js index 3e7522e31..4f77f976f 100644 --- a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js +++ b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js @@ -239,10 +239,13 @@ class Bullsubdirectory extends Component{
{ - this.props.isClassManagement() === true ? + this.props.isAdmin() === true ? (this.props.yslbool===false? - + + 编辑 +
}> this.bianji(true)}> + : "" ) @@ -251,10 +254,13 @@ class Bullsubdirectory extends Component{ { - this.props.isClassManagement() === true ? + this.props.isAdmin() === true ? (this.props.yslbool===false? - + + 删除 +
}> this.setModeltrue(true)}> + : "" ) From 220820a31317790f41e3c0d8415ab90d0a29f857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 7 Sep 2019 16:12:46 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E5=85=AC=E5=91=8A=E6=A0=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/gradinforms/Bullsubdirectory.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js index 4f77f976f..ae77b0cf3 100644 --- a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js +++ b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js @@ -216,7 +216,9 @@ class Bullsubdirectory extends Component{ let{description,whethertoeditysl,addonAfter,eduintits,informs,isSpinysl} =this.state; let{myname,mydescription,id}=this.props; const {getFieldDecorator} = this.props.form; - + console.log("Bullsubdirectory"); + console.log(this.props.isAdmin()); + console.log(this.props.yslbool); return(
From 1295cb3607279ae86345eca7bf4624e5aabb10df Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sat, 7 Sep 2019 16:19:06 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E9=A2=98=E5=BA=93=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users/question_banks_controller.rb | 5 +++-- config/routes.rb | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/controllers/users/question_banks_controller.rb b/app/controllers/users/question_banks_controller.rb index 5c8e69a29..c5b837d0b 100644 --- a/app/controllers/users/question_banks_controller.rb +++ b/app/controllers/users/question_banks_controller.rb @@ -1,11 +1,12 @@ class Users::QuestionBanksController < Users::BaseController before_action :require_login - before_action :private_user_resources! + skip_before_action :check_observed_user_exists! + # before_action :private_user_resources! before_action :check_query_params! before_action :check_user_permission! def index - service = Users::QuestionBankService.new(observed_user, query_params) + service = Users::QuestionBankService.new(User.current, query_params) question_banks = service.call @count = question_banks.count diff --git a/config/routes.rb b/config/routes.rb index 0d1b979b1..5cf74c29a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -55,12 +55,14 @@ Rails.application.routes.draw do get :homepage_info end + get :question_banks, on: :collection, to: 'users/question_banks#index' + scope module: :users do resources :courses, only: [:index] resources :shixuns, only: [:index] resources :projects, only: [:index] resources :subjects, only: [:index] - resources :question_banks, only: [:index] + # resources :question_banks, only: [:index] resource :experience_records, only: [:show] resource :grade_records, only: [:show] resource :watch, only: [:create, :destroy] From 1adc4e507f7d458f046e32b194a87230cd7bd538 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Sat, 7 Sep 2019 16:30:12 +0800 Subject: [PATCH 10/11] react help pages add title --- config/initializers/session_extenstions.rb | 35 ------------------- public/react/src/modules/help/AboutUs.js | 1 + public/react/src/modules/help/Agreement.js | 1 + public/react/src/modules/help/ContactUs.js | 1 + public/react/src/modules/help/Cooperatives.js | 1 + public/react/src/modules/help/Feedback.js | 4 +++ public/react/src/modules/help/HelpCenter.js | 1 + 7 files changed, 9 insertions(+), 35 deletions(-) delete mode 100644 config/initializers/session_extenstions.rb diff --git a/config/initializers/session_extenstions.rb b/config/initializers/session_extenstions.rb deleted file mode 100644 index 36a8ae8c7..000000000 --- a/config/initializers/session_extenstions.rb +++ /dev/null @@ -1,35 +0,0 @@ -#coding=utf-8 - -module SessionExtenstions - - module EntryExtension - def compressed? - @compressed - end - - def value - if @value - begin - Marshal.load(compressed? ? Zlib::Inflate.inflate(@value) : @value) - rescue TypeError - compressed? ? Zlib::Inflate.inflate(@value) : @value - end - end - end - - def size - if @value.nil? - 0 - else - @value.bytesize - end - end - end - - -end - -ActiveSupport::Cache::Entry.const_set("DEFAULT_COMPRESS_LIMIT", 1) -ActiveSupport::Cache::Entry.send(:prepend, SessionExtenstions::EntryExtension) - - diff --git a/public/react/src/modules/help/AboutUs.js b/public/react/src/modules/help/AboutUs.js index 85e8366c0..06198418c 100644 --- a/public/react/src/modules/help/AboutUs.js +++ b/public/react/src/modules/help/AboutUs.js @@ -16,6 +16,7 @@ class AboutUs extends React.Component { } componentDidMount(){ + window.document.title = "关于我们"; this.getContent(); } diff --git a/public/react/src/modules/help/Agreement.js b/public/react/src/modules/help/Agreement.js index c9a778360..4e483b719 100644 --- a/public/react/src/modules/help/Agreement.js +++ b/public/react/src/modules/help/Agreement.js @@ -16,6 +16,7 @@ class Agreement extends React.Component { } componentDidMount(){ + window.document.title = "服务协议"; this.getContent(); } diff --git a/public/react/src/modules/help/ContactUs.js b/public/react/src/modules/help/ContactUs.js index 00cb7b880..04e3404fe 100644 --- a/public/react/src/modules/help/ContactUs.js +++ b/public/react/src/modules/help/ContactUs.js @@ -17,6 +17,7 @@ class ContactUs extends React.Component { } componentDidMount(){ + window.document.title = "联系我们"; this.getData(); } diff --git a/public/react/src/modules/help/Cooperatives.js b/public/react/src/modules/help/Cooperatives.js index dbc0ffc4b..b64657488 100644 --- a/public/react/src/modules/help/Cooperatives.js +++ b/public/react/src/modules/help/Cooperatives.js @@ -21,6 +21,7 @@ class Cooperatives extends React.Component { } componentDidMount(){ + window.document.title = "合作伙伴"; this.getCooperatives(); } diff --git a/public/react/src/modules/help/Feedback.js b/public/react/src/modules/help/Feedback.js index d8a94bea9..c7f13f809 100644 --- a/public/react/src/modules/help/Feedback.js +++ b/public/react/src/modules/help/Feedback.js @@ -13,6 +13,10 @@ class Feedback extends React.Component { super(props); } + componentDidMount() { + window.document.title = "意见反馈"; + } + componentDidUpdate(prevProps) { if (prevProps.current_user !== this.props.current_user) { if(!this.props.checkIfLogin()) { diff --git a/public/react/src/modules/help/HelpCenter.js b/public/react/src/modules/help/HelpCenter.js index 86cce49ce..077f4b90e 100644 --- a/public/react/src/modules/help/HelpCenter.js +++ b/public/react/src/modules/help/HelpCenter.js @@ -16,6 +16,7 @@ class HelpCenter extends React.Component { } componentDidMount(){ + window.document.title = "帮助中心"; this.getContent(); } From 7559b342263b700e813f0e8b387a5c46c0343583 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 7 Sep 2019 16:30:22 +0800 Subject: [PATCH 11/11] err --- public/react/src/modules/courses/busyWork/NewWorkForm.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/NewWorkForm.js b/public/react/src/modules/courses/busyWork/NewWorkForm.js index 1626c5c6a..f5d4d9eb4 100644 --- a/public/react/src/modules/courses/busyWork/NewWorkForm.js +++ b/public/react/src/modules/courses/busyWork/NewWorkForm.js @@ -100,6 +100,7 @@ class NewWorkForm extends Component{ const courseId = this.state.course_id || this.props.match.params.coursesId ; this.props.form.validateFieldsAndScroll((err, values) => { + if(err && err.personNum) delete err.personNum; console.log(values) const mdContnet = this.contentMdRef.current.getValue().trim(); console.log(mdContnet) @@ -135,7 +136,7 @@ class NewWorkForm extends Component{ } // const errKeys = Object.keys(err); // || errKeys.length == 1 && errKeys[0] == 'content' && mdContnet - if (!err) { + if (!err || Object.keys(err).length == 0) { if (this.state.isEdit) { this.doEdit(courseId, values) } else { @@ -451,12 +452,12 @@ class NewWorkForm extends Component{ > {getFieldDecorator('personNum', { validateTrigger: 'onNone', - rules: [{ + // rules: [{ // required: true, // message: '人数不能为空' // validator: this.personNumValidator // required: true, message: '请输入最小人数和最大人数' - }], + // }], })(