diff --git a/app/models/laboratory.rb b/app/models/laboratory.rb index 53e66ece0..f319ace80 100644 --- a/app/models/laboratory.rb +++ b/app/models/laboratory.rb @@ -19,7 +19,7 @@ class Laboratory < ApplicationRecord return if subdomain.blank? rails_env = EduSetting.get('rails_env') - subdomain = subdomain.slice(0, subdomain.size - rails_env.size - 1) if subdomain.end_with?(rails_env) # winse.dev => winse + subdomain = subdomain.slice(0, subdomain.size - rails_env.size - 1) if rails_env && subdomain.end_with?(rails_env) # winse.dev => winse find_by_identifier(subdomain) end diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index fa0cdd832..b3b79ae28 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1725,7 +1725,7 @@ class Trainingjobsetting extends Component { flagPageEditstwo:releasetime, flagPageEditsthrees:deadline, flagPageEditsfor:endtime, - completionefficiencyscore:true, + completionefficiencyscore:false, work_efficiencys:this.state.work_efficiencys, unifiedsetting:this.state.unifiedsetting, latedeductiontwo:this.state.latedeductiontwo, @@ -1841,7 +1841,7 @@ class Trainingjobsetting extends Component { flagPageEditstwo:releasetime, flagPageEditsthrees:deadline, flagPageEditsfor:endtime, - completionefficiencyscore:true, + completionefficiencyscore:datas.data.work_efficiency===true?true:false, work_efficiencys:datas.data.work_efficiency, unifiedsetting:datas.data.unified_setting, latedeductiontwo:datas.data.eff_score,