From fafa152d7119f7f04e4e534a47522ef96730caa2 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Mon, 2 Mar 2020 14:56:57 +0800
Subject: [PATCH 1/8] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E8=84=9A=E6=9C=AC?=
=?UTF-8?q?=E4=B8=8D=E8=83=BD=E4=B8=BA=E7=A9=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/challenges_controller.rb | 2 +-
app/models/shixun_info.rb | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb
index c7fcb4423..103c33aab 100644
--- a/app/controllers/challenges_controller.rb
+++ b/app/controllers/challenges_controller.rb
@@ -230,7 +230,7 @@ class ChallengesController < ApplicationController
logger.info("############shixun_publiced:#{@shixun.public == 0}")
if @shixun.public == 0
script = modify_shixun_script @shixun, @shixun.evaluate_script
- @shixun.shixun_info.update_column(:evaluate_script, script)
+ @shixun.shixun_info.update_column(:evaluate_script, script) if script.present?
end
# TODO:
# if path != params[:challenge][:path]
diff --git a/app/models/shixun_info.rb b/app/models/shixun_info.rb
index c2498067f..3d3f40c92 100644
--- a/app/models/shixun_info.rb
+++ b/app/models/shixun_info.rb
@@ -2,10 +2,12 @@ class ShixunInfo < ApplicationRecord
belongs_to :shixun
validates_uniqueness_of :shixun_id
validates_length_of :fork_reason, maximum: 60, message: "不能超过60个字符"
+ validates_presence_of :evaluate_script, message: "实训脚本不能为空"
after_commit :create_diff_record
validates :description, length: { maximum: 5000, too_long: "不能超过5000个字符" }
+
private
def create_diff_record
From 31165027ed0c68f451c458ef2df5b6a4773d02c3 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Mon, 2 Mar 2020 15:35:00 +0800
Subject: [PATCH 2/8] =?UTF-8?q?=E5=AD=A6=E5=91=98=E5=AE=9E=E8=AE=AD?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/admins/myshixuns/shared/_list.html.erb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/views/admins/myshixuns/shared/_list.html.erb b/app/views/admins/myshixuns/shared/_list.html.erb
index af43c3c22..2eb3024ee 100644
--- a/app/views/admins/myshixuns/shared/_list.html.erb
+++ b/app/views/admins/myshixuns/shared/_list.html.erb
@@ -23,13 +23,13 @@
<% if myshixun.shixun.is_jupyter? %>
<%= link_to "/tasks/#{myshixun.identifier}/jupyter", target: '_blank' do %>
- <%= overflow_hidden_span myshixun.shixun.name, width: 280 %>
+ <%= overflow_hidden_span myshixun.shixun.name, width: 200 %>
<% end %>
<% else %>
<% current_task = myshixun.last_executable_task || myshixun.last_task %>
<% if current_task %>
<%= link_to "/tasks/#{current_task.identifier}", target: '_blank' do %>
- <%= overflow_hidden_span myshixun.shixun.name, width: 280 %>
+ <%= overflow_hidden_span myshixun.shixun.name, width: 200 %>
<% end %>
<% end %>
<% end %>
From 508a85b7817b2ba2b865187f8587658fe795114b Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Mon, 2 Mar 2020 16:10:45 +0800
Subject: [PATCH 3/8] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=9A=84=E6=89=B9?=
=?UTF-8?q?=E9=87=8F=E6=93=8D=E4=BD=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/homework_commons_controller.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb
index 83bcaf37a..fb327ec78 100644
--- a/app/controllers/homework_commons_controller.rb
+++ b/app/controllers/homework_commons_controller.rb
@@ -1433,7 +1433,7 @@ class HomeworkCommonsController < ApplicationController
def require_id_params
tip_exception("请至少选择一个作业") if params[:homework_ids].blank?
- tip_exception("批量设置不能超过15个") if params[:homework_ids].length > 15
+ tip_exception("批量设置不能超过15个") if params[:homework_ids].length > 15 && params[:type].blank?
end
def validate_min_max_num
From 53d6ad9882445af6a71fdd04c4cf8b8c74f8636c Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Mon, 2 Mar 2020 16:19:25 +0800
Subject: [PATCH 4/8] =?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/controllers/ecloud_controller.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/controllers/ecloud_controller.rb b/app/controllers/ecloud_controller.rb
index 8e29e5409..5fdd8947f 100644
--- a/app/controllers/ecloud_controller.rb
+++ b/app/controllers/ecloud_controller.rb
@@ -16,8 +16,8 @@ require 'digest'
class EcloudController < ApplicationController
- before_filter :save_para
- before_filter :check_sign_key, only: [:ps_new, :ps_update, :bs_new, :bs_update]
+ before_action :save_para
+ before_action :check_sign_key, only: [:ps_new, :ps_update, :bs_new, :bs_update]
def index
From 7717be70a367397abe3dd697a5abcfc7293ae8b0 Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Mon, 2 Mar 2020 16:24:50 +0800
Subject: [PATCH 5/8] =?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/ecloud.rb | 6 +++---
app/models/ecloud_productpara.rb | 2 +-
app/models/ecloud_service.rb | 2 +-
app/models/ecloud_serviece_servicepara.rb | 2 +-
app/models/ecloud_users.rb | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/app/models/ecloud.rb b/app/models/ecloud.rb
index 293948f3d..f2648093c 100644
--- a/app/models/ecloud.rb
+++ b/app/models/ecloud.rb
@@ -1,8 +1,8 @@
#encoding=utf-8
class Ecloud < ActiveRecord::Base
- attr_accessible :applyno, :begintime, :bossorderid, :custcode, :custid, :custname, :custtype, :ecordercode, :endtime,
- :mobile, :opttype, :productcode, :registersource, :string, :trial, :useralias, :userid, :username, :email,
- :effecttime, :operatime
+ # attr_accessible :applyno, :begintime, :bossorderid, :custcode, :custid, :custname, :custtype, :ecordercode, :endtime,
+ # :mobile, :opttype, :productcode, :registersource, :string, :trial, :useralias, :userid, :username, :email,
+ # :effecttime, :operatime
has_many :ecloud_services, :dependent => :destroy # 业务列表
has_many :ecloud_productparas, :dependent => :destroy # 开通参数列表
diff --git a/app/models/ecloud_productpara.rb b/app/models/ecloud_productpara.rb
index ec1b94bc5..a88fc9d6c 100644
--- a/app/models/ecloud_productpara.rb
+++ b/app/models/ecloud_productpara.rb
@@ -1,4 +1,4 @@
class EcloudProductpara < ActiveRecord::Base
- attr_accessible :key, :value, :ecloud_id
+ # attr_accessible :key, :value, :ecloud_id
belongs_to :ecloud
end
diff --git a/app/models/ecloud_service.rb b/app/models/ecloud_service.rb
index dba4a7b20..cb171b297 100644
--- a/app/models/ecloud_service.rb
+++ b/app/models/ecloud_service.rb
@@ -1,6 +1,6 @@
# 操作代码 0:新增业务,1:注销业务2:修改业务
class EcloudService < ActiveRecord::Base
- attr_accessible :begintime, :code, :endtime, :opttype, :ecloud_id, :packagecode, :bossorderid
+ # attr_accessible :begintime, :code, :endtime, :opttype, :ecloud_id, :packagecode, :bossorderid
belongs_to :ecloud
has_many :ecloud_serviece_serviceparas
end
diff --git a/app/models/ecloud_serviece_servicepara.rb b/app/models/ecloud_serviece_servicepara.rb
index 5dbff71f5..f73a3f712 100644
--- a/app/models/ecloud_serviece_servicepara.rb
+++ b/app/models/ecloud_serviece_servicepara.rb
@@ -1,5 +1,5 @@
# ket值,license表示人数,对应企业版;duration表示月数,对应个人版;
class EcloudServieceServicepara < ActiveRecord::Base
- attr_accessible :key, :value, :ecloud_service_id
+ # attr_accessible :key, :value, :ecloud_service_id
belongs_to :ecloud_service
end
diff --git a/app/models/ecloud_users.rb b/app/models/ecloud_users.rb
index 99da0df24..8f29c8e2d 100644
--- a/app/models/ecloud_users.rb
+++ b/app/models/ecloud_users.rb
@@ -1,4 +1,4 @@
class EcloudUser < ActiveRecord::Base
# opttype: # user['opttype']: 操作类型0:开通;1:变更;3: 取消授权;4:暂停;5:恢复;
- attr_accessible :begintime, :email, :endtime, :mobile, :opttype, :paras, :useralias, :userid, :username, :custid
+ # attr_accessible :begintime, :email, :endtime, :mobile, :opttype, :paras, :useralias, :userid, :username, :custid
end
From 26721b59755f63c88a415483efadaa443c466aa6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Mon, 2 Mar 2020 16:32:34 +0800
Subject: [PATCH 6/8] =?UTF-8?q?=E5=90=88=E5=B9=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/AppConfig.js | 4 ++--
public/react/src/modules/tpm/newshixuns/Newshixuns.js | 11 +++++++----
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index a3c081285..c7cdc84ab 100644
--- a/public/react/src/AppConfig.js
+++ b/public/react/src/AppConfig.js
@@ -42,7 +42,7 @@ if (isDev) {
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
}
// 超管
-// debugType="admin";
+debugType="admin";
// 老师
//debugType="teacher";
// 学生
@@ -136,7 +136,7 @@ export function initAxiosInterceptors(props) {
// proxy="https://test-jupyterweb.educoder.net"
// proxy="https://test-newweb.educoder.net"
// proxy="https://test-jupyterweb.educoder.net"
- //proxy="http://192.168.2.63:3001"
+ //proxy="https://test-jupyterweb.educoder.net/"
// 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求;
diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js
index d017fe2aa..46f45a8a7 100644
--- a/public/react/src/modules/tpm/newshixuns/Newshixuns.js
+++ b/public/react/src/modules/tpm/newshixuns/Newshixuns.js
@@ -432,7 +432,9 @@ class Newshixuns extends Component {
},
}
- return (
+
+
+ return (
|