Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

dev_forum
杨树明 5 years ago
commit 96cb72f0be

@ -924,10 +924,10 @@ class CoursesController < ApplicationController
course_message.save! 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) ApplyTeacherRoleJoinCourseNotifyJob.perform_later(current_user.id, course.id, role)
teacher_role = 1 teacher_role = 1
message = "#{course_message.content == 2 ? '' : '教'}申请已提交,请等待审核" message = "#{course_message.content == 2 ? '教' : ''}申请已提交,请等待审核"
end end
end end
end end

@ -540,7 +540,7 @@ class HomeworkCommonsController < ApplicationController
tip_exception("补交结束时间必须晚于截止时间") if params[:late_time] <= strf_time(@homework.end_time) tip_exception("补交结束时间必须晚于截止时间") if params[:late_time] <= strf_time(@homework.end_time)
tip_exception("补交结束时间不能晚于课堂结束时间") if @course.end_date.present? && params[:late_time] > tip_exception("补交结束时间不能晚于课堂结束时间") if @course.end_date.present? && params[:late_time] >
strf_time(@course.end_date.end_of_day) 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.allow_late = true
@homework.late_time = params[:late_time] @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("缺少answer_open_evaluation参数") if params[:answer_open_evaluation].nil?
tip_exception("缺少work_efficiency参数") if params[:work_efficiency].nil? tip_exception("缺少work_efficiency参数") if params[:work_efficiency].nil?
tip_exception("缺少eff_score参数") if params[:work_efficiency] && params[:eff_score].blank? 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("缺少shixun_evaluation参数") if params[:shixun_evaluation].blank?
tip_exception("缺少challenge_settings参数") if params[:challenge_settings].blank? tip_exception("缺少challenge_settings参数") if params[:challenge_settings].blank?
# tip_exception("缺少challenge_id参数") if params[:challenge_settings][:challenge_id].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 if !@homework_detail_manual.final_mode
tip_exception("教师评分比例不能为空") if params[:te_proportion].blank? tip_exception("教师评分比例不能为空") if params[:te_proportion].blank?
te_proportion = params[:te_proportion].to_f.round(2) 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? tip_exception("助教评分比例不能为空") if params[:ta_proportion].blank?
ta_proportion = params[:ta_proportion].to_f.round(2) 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 if !@homework.anonymous_comment
tip_exception("评分比例之和不能大于100") if (te_proportion + ta_proportion) > 1.0 tip_exception("评分比例之和不能大于100") if (te_proportion + ta_proportion) > 1.0
else else
tip_exception("学生评分比例不能为空") if params[:st_proportion].blank? tip_exception("学生评分比例不能为空") if params[:st_proportion].blank?
st_proportion = params[:st_proportion].to_f.round(2) 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 tip_exception("评分比例之和不能大于100") if (te_proportion + ta_proportion + st_proportion) > 1.0
end end

@ -4021,7 +4021,10 @@
{ {
var katexHandle = function() { var katexHandle = function() {
div.find("." + editormd.classNames.tex).each(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(/&lt;/g, "<").replace(/&gt;/g, ">"), tex[0]);
katex.render(tex.text(), tex[0]); katex.render(tex.text(), tex[0]);
tex.find(".katex").css("font-size", "1.0em"); tex.find(".katex").css("font-size", "1.0em");
}); });

@ -469,7 +469,7 @@ class AccountBasic extends Component {
width:220px; width:220px;
} }
.basicForm .ant-input-suffix { .basicForm .ant-input-suffix {
line-height: 2.2; line-height: 2.8;
background: transparent !important; background: transparent !important;
} }
`}</style> `}</style>

Loading…
Cancel
Save