From 7f5a50b7e017f563ffb29ba4e318ebf05295797c Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 25 Jul 2019 18:03:53 +0800 Subject: [PATCH 01/18] =?UTF-8?q?=E6=8F=90=E7=A4=BA=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_commons_controller.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb index 4c8d2a729..1641e98b9 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -540,7 +540,7 @@ class HomeworkCommonsController < ApplicationController tip_exception("补交结束时间必须晚于截止时间") if params[:late_time] <= strf_time(@homework.end_time) tip_exception("补交结束时间不能晚于课堂结束时间") if @course.end_date.present? && params[:late_time] > strf_time(@course.end_date.end_of_day) - tip_exception("迟交扣分应为正整数") if params[:late_penalty] && params[:late_penalty].to_i < 0 + tip_exception("迟交扣分不能小于0") if params[:late_penalty] && params[:late_penalty].to_i < 0 @homework.allow_late = true @homework.late_time = params[:late_time] @@ -560,7 +560,7 @@ class HomeworkCommonsController < ApplicationController tip_exception("缺少answer_open_evaluation参数") if params[:answer_open_evaluation].nil? tip_exception("缺少work_efficiency参数") if params[:work_efficiency].nil? tip_exception("缺少eff_score参数") if params[:work_efficiency] && params[:eff_score].blank? - tip_exception("效率分应为正整数") if params[:eff_score] && params[:eff_score].to_i < 0 + tip_exception("效率分不能小于等于0") if params[:eff_score] && params[:eff_score].to_i <= 0 tip_exception("缺少shixun_evaluation参数") if params[:shixun_evaluation].blank? tip_exception("缺少challenge_settings参数") if params[:challenge_settings].blank? # tip_exception("缺少challenge_id参数") if params[:challenge_settings][:challenge_id].blank? @@ -734,16 +734,16 @@ class HomeworkCommonsController < ApplicationController if !@homework_detail_manual.final_mode tip_exception("教师评分比例不能为空") if params[:te_proportion].blank? te_proportion = params[:te_proportion].to_f.round(2) - tip_exception("教师评分比例不能小于零") if te_proportion < 0 + tip_exception("教师评分比例不能小于0") if te_proportion < 0 tip_exception("助教评分比例不能为空") if params[:ta_proportion].blank? ta_proportion = params[:ta_proportion].to_f.round(2) - tip_exception("助教评分比例不能小于零") if ta_proportion < 0 + tip_exception("助教评分比例不能小于0") if ta_proportion < 0 if !@homework.anonymous_comment tip_exception("评分比例之和不能大于100") if (te_proportion + ta_proportion) > 1.0 else tip_exception("学生评分比例不能为空") if params[:st_proportion].blank? st_proportion = params[:st_proportion].to_f.round(2) - tip_exception("学生评分比例不能小于零") if st_proportion < 0 + tip_exception("学生评分比例不能小于0") if st_proportion < 0 tip_exception("评分比例之和不能大于100") if (te_proportion + ta_proportion + st_proportion) > 1.0 end From b9347aa0ace774de38a4d77263016a64535d5123 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 25 Jul 2019 18:08:08 +0800 Subject: [PATCH 02/18] =?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/courses_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 230e7f387..b40321dd3 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -924,10 +924,10 @@ class CoursesController < ApplicationController course_message.save! - role = course_message.content == 2 ? '7' : '9' # 7:老师 9:助教 + role = course_message.content == 2 ? '7' : '9' # 7:助教 9:教师 ApplyTeacherRoleJoinCourseNotifyJob.perform_later(current_user.id, course.id, role) teacher_role = 1 - message = "#{course_message.content == 2 ? '教师' : '助教'}申请已提交,请等待审核" + message = "#{course_message.content == 2 ? '助教' : '教师'}申请已提交,请等待审核" end end end From 32637fba2c76b099794486858032f5effd94ef53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 25 Jul 2019 18:25:32 +0800 Subject: [PATCH 03/18] =?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/shixunHomework/Trainingjobsetting.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 3d1aecf5b..6511b6f0b 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -588,7 +588,7 @@ class Trainingjobsetting extends Component { late_time: moment(this.state.late_time).format('YYYY-MM-DD HH:mm'), //结束时间 answer_open_evaluation: this.state.level === "满分" ? true : false, //扣分项 work_efficiency: this.state.completionefficiencyscore, //完成效率评分占比 - eff_score: this.state.completionefficiencyscore === true ? this.state.latedeductiontwo : 0,//占比分 + eff_score: this.state.completionefficiencyscore === true ? this.state.latedeductiontwo : undefined,//占比分 shixun_evaluation: this.state.proportion === "均分比例" ? 0 : this.state.proportion === "经验值比例" ? 1 : this.state.proportion === "自定义分值" ? 2 : 0, challenge_settings: array, score_open: this.state.publicwork, @@ -604,7 +604,7 @@ class Trainingjobsetting extends Component { late_time: moment(this.state.late_time).format('YYYY-MM-DD HH:mm'), //结束时间 answer_open_evaluation: this.state.level === "满分" ? true : false, //扣分项 work_efficiency: this.state.completionefficiencyscore, //完成效率评分占比 - eff_score: this.state.completionefficiencyscore === true ? this.state.latedeductiontwo : 0,//占比分 + eff_score: this.state.completionefficiencyscore === true ? this.state.latedeductiontwo : undefined,//占比分 shixun_evaluation: this.state.proportion === "均分比例" ? 0 : this.state.proportion === "经验值比例" ? 1 : this.state.proportion === "自定义分值" ? 2 : 0, challenge_settings: array, score_open: this.state.publicwork, From 62b48f7713f1437a9dd06c9b13aaf667f7105fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 25 Jul 2019 18:28:37 +0800 Subject: [PATCH 04/18] =?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/user/FindPasswordComponent.js | 9 ++++---- .../modules/user/LoginRegisterComponent.js | 22 +++++++++++++------ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index 6ee2a1de1..3263f7327 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -31,7 +31,7 @@ class LoginRegisterComponent extends Component { seconds: 60, codes: "", getverificationcodes: true, - Phonenumberisnotcobool: false, + Phonenumberisnotcobool: true, Phonenumberisnotco: undefined, Phonenumberisnotcosytdhk:undefined, Phonenumberisnotcosmmm: undefined, @@ -508,11 +508,10 @@ class LoginRegisterComponent extends Component { if (!regph.test(this.state.login)) { stringdata = "手机号格式不正确"; this.setState({ - Phonenumberisnotco: stringdata, - Phonenumberisnotcobool: false, + Phonenumberisnotco: undefined, + Phonenumberisnotcobool: true, Phonenumberisnotcosytdhk:undefined, - dragOk:false, - Whethertoverify: this.state.Whethertoverify === true ? false : true, + dragOk: true, }) } else { this.setState({ diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index 8da41e0e9..ec9778fc8 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -206,7 +206,6 @@ class LoginRegisterComponent extends Component { } //是否验证通过 dragOkCallback = () => { - debugger this.setState({ Phonenumberisnotcosytdhk:undefined, }) @@ -217,6 +216,8 @@ class LoginRegisterComponent extends Component { dragOk:false, Whethertoverify:this.state.Whethertoverify===true?false:true, }) + console.log("s0"); + return; } // var telephone = $("#telephoneAdd.tianjia_phone").val(); @@ -229,11 +230,11 @@ class LoginRegisterComponent extends Component { if (!regph.test(this.state.logins)) { stringdata = "手机号格式不正确"; this.setState({ - Phonenumberisnotcos: stringdata, - Phonenumberisnotcobool: true, - dragOk:false, - Whethertoverify:this.state.Whethertoverify===true?false:true, + Phonenumberisnotcos: undefined, + Phonenumberisnotcobool: false, + dragOk:true, }) + console.log("s1"); } else { this.setState({ Phonenumberisnotcos: undefined, @@ -256,9 +257,12 @@ class LoginRegisterComponent extends Component { Phonenumberisnotcobool: true, dragOk:false, Whethertoverify:this.state.Whethertoverify===true?false:true, - }) + }); + console.log("s2"); + return } else { + console.log("s222222"); this.setState({ Phonenumberisnotcos: undefined, Phonenumberisnotcobool: false, @@ -492,6 +496,8 @@ class LoginRegisterComponent extends Component { dragOk:false, Whethertoverify:this.state.Whethertoverify===true?false:true, }) + console.log("s5"); + } return; } else if (id === 2) { @@ -501,7 +507,9 @@ class LoginRegisterComponent extends Component { dragOk:false, Whethertoverify:this.state.Whethertoverify===true?false:true, }) - return; + console.log("s6"); + + return; } }else { if (id === 1) { From 10a72d7ae957799cfe0136312bfe2b365514db8c Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 25 Jul 2019 18:33:17 +0800 Subject: [PATCH 05/18] =?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/courses_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index b40321dd3..778d40b81 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -928,6 +928,8 @@ class CoursesController < ApplicationController ApplyTeacherRoleJoinCourseNotifyJob.perform_later(current_user.id, course.id, role) teacher_role = 1 message = "#{course_message.content == 2 ? '助教' : '教师'}申请已提交,请等待审核" + else + message = "#{existing_course_message.extra.to_i == 7 ? '助教' : '教师'}申请已提交,请等待审核" end end end From a807df07ed8cbb80409bda1505964fbd7d3f8952 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 25 Jul 2019 18:35:55 +0800 Subject: [PATCH 06/18] =?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/courses_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 778d40b81..faad02173 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -914,7 +914,7 @@ class CoursesController < ApplicationController teacher_already_exist = current_user.teacher_of_course_non_active? course unless teacher_already_exist existing_course_message = CourseMessage.find_by(course_id: course.id, course_message_id: current_user.id, - course_message_type: "JoinCourseRequest", status: 0, viewed: false) + course_message_type: "JoinCourseRequest", status: 0) if existing_course_message.blank? course_message = CourseMessage.new(course_id: course.id, user_id: course.tea_id, status: 0, course_message_id: current_user.id, course_message_type: "JoinCourseRequest", @@ -929,7 +929,7 @@ class CoursesController < ApplicationController teacher_role = 1 message = "#{course_message.content == 2 ? '助教' : '教师'}申请已提交,请等待审核" else - message = "#{existing_course_message.extra.to_i == 7 ? '助教' : '教师'}申请已提交,请等待审核" + message = "#{existing_course_message.content == 2 ? '助教' : '教师'}申请已提交,请等待审核" end end end @@ -943,7 +943,7 @@ class CoursesController < ApplicationController end rescue => e uid_logger(e.message) - tip_exception("加入课堂失败") + tip_exception(e.message) raise ActiveRecord::Rollback end end From e6ba772da66eeb5af6ad74a630b702120c2e28d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 25 Jul 2019 18:50:13 +0800 Subject: [PATCH 07/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/shixunHomework/Listofworksstudentone.js | 1 + .../modules/courses/shixunHomework/Trainingjobsetting.js | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 462ec541f..8bb2bbcfd 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -1017,6 +1017,7 @@ class Listofworksstudentone extends Component { view_report: result.data.view_report, allow_late:result.data.allow_late, loadingstate: false, + computeTimetype:true, }) this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1); diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 6511b6f0b..61b043cea 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1698,14 +1698,14 @@ class Trainingjobsetting extends Component { if(rules[i].course_group_id instanceof Array ){ datas.push({ group_id:rules[i].course_group_id, - publish_time: moment(rules[i].publish_time).format('YYYY-MM-DD HH:mm') , - end_time:moment(rules[i].end_time).format('YYYY-MM-DD HH:mm') , + publish_time:rules[i].publish_time===undefined||rules[i].publish_time===null||rules[i].publish_time===""?"": moment(rules[i].publish_time).format('YYYY-MM-DD HH:mm') , + end_time:rules[i].end_time===undefined||rules[i].end_time===null||rules[i].end_time===""?"": moment(rules[i].end_time).format('YYYY-MM-DD HH:mm') , }); }else { datas.push({ group_id:[rules[i].course_group_id], - publish_time: moment(rules[i].publish_time).format('YYYY-MM-DD HH:mm') , - end_time:moment(rules[i].end_time).format('YYYY-MM-DD HH:mm') , + publish_time: rules[i].publish_time===undefined||rules[i].publish_time===null||rules[i].publish_time===""?"": moment(rules[i].publish_time).format('YYYY-MM-DD HH:mm') , + end_time:rules[i].end_time===undefined||rules[i].end_time===null||rules[i].end_time===""?"": moment(rules[i].end_time).format('YYYY-MM-DD HH:mm') , }); } From 030e83ea10b3fd5e3cf76c8c87b4f6ed674d6a41 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 25 Jul 2019 18:52:16 +0800 Subject: [PATCH 08/18] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E9=AB=98=E6=A0=A1?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E5=AE=8C=E5=96=84=E8=B5=84=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/add_school_applies_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/add_school_applies_controller.rb b/app/controllers/add_school_applies_controller.rb index 22b3d360a..e0a09665d 100644 --- a/app/controllers/add_school_applies_controller.rb +++ b/app/controllers/add_school_applies_controller.rb @@ -1,5 +1,5 @@ class AddSchoolAppliesController < ApplicationController - before_action :require_login, :check_auth + before_action :require_login def create school = CreateAddSchoolApplyService.call(current_user, create_params) From 0ed0caaa64b2538f7a9d6f2e5138a5606ad758f6 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 25 Jul 2019 18:55:48 +0800 Subject: [PATCH 09/18] =?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/homework_commons_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb index 1641e98b9..f92ed8e2e 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -38,7 +38,7 @@ class HomeworkCommonsController < ApplicationController tip_exception("子目录id有误") if !@category.present? @homework_commons = @homework_commons.where(course_second_category_id: params[:category]) elsif @homework_type == 4 - @homework_commons = @homework_commons.where(course_second_category_id: 0) + @homework_commons = @homework_commons end @all_count = @homework_commons.size From 651399837f07ad7155c9cdae16e2fb670e3340c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 25 Jul 2019 18:57:32 +0800 Subject: [PATCH 10/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/coursesDetail/CoursesLeftNav.js | 2 +- public/react/src/modules/paths/PathDetail/DetailCards.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js index 707c4ba9b..ad7172be5 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js @@ -505,7 +505,7 @@ class Coursesleftnav extends Component{ }else if(NavmodalValue.length>20){ this.setState({ NavmodalValuetype:true, - NavmodalValues:"名称不能超过20个字" + NavmodalValues:"名称不能超过60个字" }) return } diff --git a/public/react/src/modules/paths/PathDetail/DetailCards.js b/public/react/src/modules/paths/PathDetail/DetailCards.js index 0e95f1a48..fc75961ec 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCards.js +++ b/public/react/src/modules/paths/PathDetail/DetailCards.js @@ -469,7 +469,7 @@ class DetailCards extends Component{ { showparagraphkey===key&&showparagraphindex===index?
查看详情 - this.startgameid(line.identifier)} className="btn_auto user_bluebg_btn fl" id="shixun_operation" >开始实战 + {line.shixun_status==="暂未公开"?"":this.startgameid(line.identifier)} className="btn_auto user_bluebg_btn fl" id="shixun_operation" >开始实战}
:"" } From d6be63011f7cb45b5e9b7c808f03d060fdfe88f5 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 25 Jul 2019 18:59:18 +0800 Subject: [PATCH 11/18] =?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/helpers/courses_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index fa51de6b7..8c2aeb479 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -199,7 +199,8 @@ module CoursesHelper # 获取课堂的作业数 def get_homework_commons_count(course, type, category_id) - HomeworkCommon.where(course_id: course.id, homework_type: type, course_second_category_id: category_id).size + category_id == 0 ? HomeworkCommon.where(course_id: course.id, homework_type: type).size : + HomeworkCommon.where(course_id: course.id, homework_type: type, course_second_category_id: category_id).size end From d3de780bb4ec3f62f5ca9775546e5345f0d92f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 25 Jul 2019 19:39:08 +0800 Subject: [PATCH 12/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/shixunHomework/Trainingjobsetting.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 61b043cea..6511b6f0b 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1698,14 +1698,14 @@ class Trainingjobsetting extends Component { if(rules[i].course_group_id instanceof Array ){ datas.push({ group_id:rules[i].course_group_id, - publish_time:rules[i].publish_time===undefined||rules[i].publish_time===null||rules[i].publish_time===""?"": moment(rules[i].publish_time).format('YYYY-MM-DD HH:mm') , - end_time:rules[i].end_time===undefined||rules[i].end_time===null||rules[i].end_time===""?"": moment(rules[i].end_time).format('YYYY-MM-DD HH:mm') , + publish_time: moment(rules[i].publish_time).format('YYYY-MM-DD HH:mm') , + end_time:moment(rules[i].end_time).format('YYYY-MM-DD HH:mm') , }); }else { datas.push({ group_id:[rules[i].course_group_id], - publish_time: rules[i].publish_time===undefined||rules[i].publish_time===null||rules[i].publish_time===""?"": moment(rules[i].publish_time).format('YYYY-MM-DD HH:mm') , - end_time:rules[i].end_time===undefined||rules[i].end_time===null||rules[i].end_time===""?"": moment(rules[i].end_time).format('YYYY-MM-DD HH:mm') , + publish_time: moment(rules[i].publish_time).format('YYYY-MM-DD HH:mm') , + end_time:moment(rules[i].end_time).format('YYYY-MM-DD HH:mm') , }); } From a18caf2525866f26bf5d290610399a34945160b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 25 Jul 2019 19:39:28 +0800 Subject: [PATCH 13/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/Trainingjobsetting.js | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 61b043cea..77e743eb8 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -577,6 +577,8 @@ class Trainingjobsetting extends Component { this.props.showNotification(`没有关卡不能更新设置`); return; } + + if(this.state.unifiedsetting === true){ console.log("统一设置"); data = { @@ -594,11 +596,27 @@ class Trainingjobsetting extends Component { score_open: this.state.publicwork, } }else{ - //非统一配置 - console.log("非统一设置"); + // //非统一配置 + // console.log("非统一设置"); + // let rulesdata=this.state.rulesdata; + // + // rulesdata.map((item,key)=>{ + // + // if(item.publish_time==="Invalid date"){ + // item.publish_time="" + // } + // if(item.end_time==="Invalid date"){ + // item.end_time="" + // } + // if(item.publiend_timesh_time==="Invalid date"){ + // item.publiend_timesh_time="" + // } + // }) + // + let {rules}=this.state; data = { unified_setting: this.state.unifiedsetting, //非统一配置 - group_settings: this.state.rulesdata, + group_settings: rules, allow_late: this.state.allowreplenishment, //补交 late_penalty: parseInt(this.state.latededuction), //迟交扣分 late_time: moment(this.state.late_time).format('YYYY-MM-DD HH:mm'), //结束时间 From e1012754927063093f565d695ac669649d1931d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 25 Jul 2019 19:52:53 +0800 Subject: [PATCH 14/18] b --- .../courses/shixunHomework/Trainingjobsetting.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index f25644f95..b95adcaf2 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -196,8 +196,8 @@ class Trainingjobsetting extends Component { array.push({ course_group_id: result.data.group_settings[i].group_id, course_group_name: result.data.group_settings[i].group_name, - publish_time: result.data.group_settings[i].publish_time, - end_time: result.data.group_settings[i].end_time, + publish_time: moment(result.data.group_settings[i].publish_time).format('YYYY-MM-DD HH:mm'), + end_time: moment(result.data.group_settings[i].end_time).format('YYYY-MM-DD HH:mm'), publish_flag: "", end_flag: "", class_flag: "", @@ -215,8 +215,8 @@ class Trainingjobsetting extends Component { arrays.push({ course_group_id:result.data.group_settings[i].group_id, course_group_name:result.data.group_settings[i].group_name, - publish_time:result.data.group_settings[i].publish_time, - end_time:result.data.group_settings[i].end_time, + publish_time:moment( result.data.group_settings[i].publish_time).format('YYYY-MM-DD HH:mm') , + end_time:moment(result.data.group_settings[i].end_time ).format('YYYY-MM-DD HH:mm'), course_choosed:0, }) @@ -612,7 +612,7 @@ class Trainingjobsetting extends Component { // item.publiend_timesh_time="" // } // }) - // + let {rules}=this.state; data = { unified_setting: this.state.unifiedsetting, //非统一配置 From c1646797bdfe0d0b56b098cb4475c7abdde457b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 25 Jul 2019 19:55:34 +0800 Subject: [PATCH 15/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/shixunHomework/Trainingjobsetting.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index f25644f95..2d41bacc6 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -447,8 +447,8 @@ class Trainingjobsetting extends Component { } else { let rulesdata=this.state.rulesdata; - // console.log("pustdate123131312321321321"); - // console.log(rulesdata); + console.log("pustdate123131312321321321"); + console.log(rulesdata); if( rulesdata.length === 0){ this.props.showNotification(`分班发布设置不能为空`); @@ -614,6 +614,7 @@ class Trainingjobsetting extends Component { // }) // let {rules}=this.state; + var mydatas=[]; data = { unified_setting: this.state.unifiedsetting, //非统一配置 group_settings: rules, @@ -1728,8 +1729,8 @@ class Trainingjobsetting extends Component { } } - console.log(rules) - console.log(datas) + console.log(rules); + console.log(datas); this.setState({ rules, rulesdata:datas, From eaff51442161e0cee7c02b2f29aee9beede72c18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 25 Jul 2019 20:26:38 +0800 Subject: [PATCH 16/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/Trainingjobsetting.js | 33 +++++++++---------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 8b0a6bf23..b07392153 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -598,26 +598,23 @@ class Trainingjobsetting extends Component { }else{ // //非统一配置 // console.log("非统一设置"); - // let rulesdata=this.state.rulesdata; - // - // rulesdata.map((item,key)=>{ - // - // if(item.publish_time==="Invalid date"){ - // item.publish_time="" - // } - // if(item.end_time==="Invalid date"){ - // item.end_time="" - // } - // if(item.publiend_timesh_time==="Invalid date"){ - // item.publiend_timesh_time="" - // } - // }) - - let {rules}=this.state; - var mydatas=[]; + let rulesdata=this.state.rulesdata; + + let newlist=[] + + rulesdata.map((item,key)=>{ + + if(item.publish_time==="Invalid date"||item.end_time==="Invalid date"||item.publiend_timesh_time==="Invalid date"){ + + }else{ + newlist.push(item) + } + + }) + data = { unified_setting: this.state.unifiedsetting, //非统一配置 - group_settings: rules, + group_settings: newlist, allow_late: this.state.allowreplenishment, //补交 late_penalty: parseInt(this.state.latededuction), //迟交扣分 late_time: moment(this.state.late_time).format('YYYY-MM-DD HH:mm'), //结束时间 From 7adeff8cca6c079a3b5e88a527d94a8a4a6e7d9a Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Thu, 25 Jul 2019 21:07:24 +0800 Subject: [PATCH 17/18] =?UTF-8?q?git=20=E4=BB=A3=E7=A0=81=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=B8=8D=E6=88=90=E5=8A=9F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 34576db66..f2d9c7fb1 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -161,7 +161,7 @@ class User < ApplicationRecord end def git_mail - mail || "#{login}@educoder.net" + mail.blank? ? "#{login}@educoder.net" : mail end # 学号 From c050a7c6fa482ff1b99dc515ca11e9247462255a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 26 Jul 2019 09:02:23 +0800 Subject: [PATCH 18/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/user/FindPasswordComponent.js | 9 +++++---- .../react/src/modules/user/LoginRegisterComponent.js | 10 ++++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index 3263f7327..408ca6142 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -109,12 +109,13 @@ class LoginRegisterComponent extends Component { return; } //拖动滑动验证 - if(this.state.dragOk === false){ - this.openNotification("拖动滑块验证"); - return; + if(this.state.pciphone===true) { + if (this.state.dragOk === false) { + this.openNotification("拖动滑块验证"); + return; + } } - if (this.state.getverificationcodes === true) { this.setState({ getverificationcodes: undefined, diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index ec9778fc8..2e506af50 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -589,10 +589,12 @@ class LoginRegisterComponent extends Component { }) return; } - if(this.state.dragOk === false){ - this.openNotification("拖动滑块验证"); - return; - } + if(this.state.pciphone===true) { + if (this.state.dragOk === false) { + this.openNotification("拖动滑块验证"); + return; + } + } if (this.state.getverificationcodes === true) { this.setState({