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 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 diff --git a/public/react/public/js/editormd/editormd.min.js b/public/react/public/js/editormd/editormd.min.js index 048d95dc5..0b99c713a 100755 --- a/public/react/public/js/editormd/editormd.min.js +++ b/public/react/public/js/editormd/editormd.min.js @@ -4021,7 +4021,10 @@ { var katexHandle = function() { div.find("." + editormd.classNames.tex).each(function(){ - var tex = $(this); + var tex = $(this); + // 和线上的不一样? + // http://editor.md.ipandao.com/examples/html-preview-markdown-to-html-custom-toc-container.html#Editor.md + // katex.render(tex.html().replace(/</g, "<").replace(/>/g, ">"), tex[0]); katex.render(tex.text(), tex[0]); tex.find(".katex").css("font-size", "1.0em"); }); 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, diff --git a/public/react/src/modules/user/account/AccountBasicEdit.js b/public/react/src/modules/user/account/AccountBasicEdit.js index 24674a3ce..38c8fd98c 100644 --- a/public/react/src/modules/user/account/AccountBasicEdit.js +++ b/public/react/src/modules/user/account/AccountBasicEdit.js @@ -469,7 +469,7 @@ class AccountBasic extends Component { width:220px; } .basicForm .ant-input-suffix { - line-height: 2.2; + line-height: 2.8; background: transparent !important; } `}