From 4f847b2d14d25b1cf5441fa76cab35db7a3b5577 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Tue, 15 Oct 2019 19:15:43 +0800 Subject: [PATCH 1/2] fix laboratory setting --- app/models/laboratory.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 9ca786dfeaa2cf5cb269bad97aa509ead91f5b10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 15 Oct 2019 19:17:03 +0800 Subject: [PATCH 2/2] =?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 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,