From 714779723a849d63d7ff14481ea45334c530da3a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Mon, 2 Dec 2019 14:47:37 +0800
Subject: [PATCH 1/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
---
public/react/src/modules/tpm/TPMIndexHOC.js | 7 ++++---
public/react/src/tpm/TPMIndexHOC.js | 7 ++++---
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js
index b2cba2aca..73c882ab5 100644
--- a/public/react/src/modules/tpm/TPMIndexHOC.js
+++ b/public/react/src/modules/tpm/TPMIndexHOC.js
@@ -20,6 +20,7 @@ import Trialapplication from "../login/Trialapplication";
const $ = window.$;
const versionNum = '0001';
+const timestamp = Date.parse(new Date());
// let _url_origin = getUrl()
let _url_origin='';
if(window.location.port === "3007"){
@@ -35,14 +36,14 @@ if (!window['indexHOCLoaded']) {
// $('head').append($('')
// .attr('href', `${_url_origin}/stylesheets/educoder/antd.min.css?1525440977`));
$('head').append($('')
- .attr('href', `${_url_origin}/stylesheets/css/edu-common.css?8`));
+ .attr('href', `${_url_origin}/stylesheets/css/edu-common.css?${timestamp}`));
$('head').append($('')
- .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?8`));
+ .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?${timestamp}`));
// index.html有加载
$('head').append($('')
- .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?8`));
+ .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?${timestamp}`));
// $('head').append($('')
diff --git a/public/react/src/tpm/TPMIndexHOC.js b/public/react/src/tpm/TPMIndexHOC.js
index 451344a56..9aa3d4bbc 100644
--- a/public/react/src/tpm/TPMIndexHOC.js
+++ b/public/react/src/tpm/TPMIndexHOC.js
@@ -20,6 +20,7 @@ import Trialapplication from "../login/Trialapplication";
const $ = window.$;
const versionNum = '0001';
+const timestamp = Date.parse(new Date());
// let _url_origin = getUrl()
let _url_origin='';
if(window.location.port === "3007"){
@@ -35,14 +36,14 @@ if (!window['indexHOCLoaded']) {
// $('head').append($('')
// .attr('href', `${_url_origin}/stylesheets/educoder/antd.min.css?1525440977`));
$('head').append($('')
- .attr('href', `${_url_origin}/stylesheets/css/edu-common.css?8`));
+ .attr('href', `${_url_origin}/stylesheets/css/edu-common.css?${timestamp}`));
$('head').append($('')
- .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?8`));
+ .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?${timestamp}`));
// index.html有加载
$('head').append($('')
- .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?8`));
+ .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?${timestamp}`));
// $('head').append($('')
From 6a80766cae3198ec0ec4506bf2cde27854493789 Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Mon, 2 Dec 2019 17:40:43 +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
---
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 ce5a56c0d..2ba86ed90 100644
--- a/app/models/laboratory.rb
+++ b/app/models/laboratory.rb
@@ -50,7 +50,7 @@ class Laboratory < ApplicationRecord
if main_site?
not_shixun_ids = Shixun.joins(:laboratory_shixuns).where("laboratory_shixuns.laboratory_id != #{Laboratory.current.id}")
Shixun.where.not(id: not_shixun_ids.pluck(:shixun_id))
- elsif sync_subject
+ elsif sync_shixun
laboratory_shixun_ids = laboratory_shixuns.pluck(:shixun_id)
school_shixun_ids = Shixun.joins("join user_extensions on shixuns.user_id=user_extensions.user_id").where(user_extensions: { school_id: school_id }).pluck(:id)
shixun_ids = laboratory_shixun_ids + school_shixun_ids