From 7303a7e626bce985e359f7b22a635a79876ccfbb Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 15 Oct 2019 17:50:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B5=84=E6=BA=90=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/attachment.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 9c60317bd..8b7034ab9 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -98,7 +98,7 @@ class Attachment < ApplicationRecord def become_history history = self.attachment_histories.first - new_attachment_history = AttachmentHistory.new(self.attributes.except("id", "resource_bank_id", "unified_setting", "course_second_category_id").merge( + new_attachment_history = AttachmentHistory.new(self.attributes.except("id", "resource_bank_id", "unified_setting", "course_second_category_id", "delay_publish").merge( attachment_id: self.id, version: history.nil? ? 1 : history.version + 1, )) @@ -106,7 +106,7 @@ class Attachment < ApplicationRecord end def copy_attributes_from_new_attachment(new_attachment) - self.attributes = new_attachment.attributes.dup.except("id","container_id","container_type","is_public","downloads", "quotes",'is_publish','publish_time') + self.attributes = new_attachment.attributes.dup.except("id","container_id","container_type","is_public","downloads", "quotes",'is_publish','publish_time', "delay_publish") end def set_public(is_public) From ead7c7c47452ea0a2eca96f8c7efd25ac0c47a80 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 15 Oct 2019 17:52:52 +0800 Subject: [PATCH 2/2] style --- public/react/src/modules/courses/members/ChangeRolePop.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/members/ChangeRolePop.js b/public/react/src/modules/courses/members/ChangeRolePop.js index 455e851ee..adc4fa26a 100644 --- a/public/react/src/modules/courses/members/ChangeRolePop.js +++ b/public/react/src/modules/courses/members/ChangeRolePop.js @@ -6,7 +6,7 @@ import axios from 'axios' /** 角色数组, CREATOR: 创建者, PROFESSOR: 教师, ASSISTANT_PROFESSOR: 助教, STUDENT: 学生 */ -function ChangeRolePop({ member_roles = [], record, courseId, onChangeRoleSuccess, showNotification, getUserId, fetchUser }) { +function ChangeRolePop({ member_roles = [], record, courseId, onChangeRoleSuccess, showNotification, getUserId, fetchUser, style }) { const [checkBoxRoles, setCheckBoxRoles] = useState(member_roles) // useEffect(() => { // if (checkBoxRoles.length != member_roles.length) { // 死循环 @@ -75,7 +75,7 @@ function ChangeRolePop({ member_roles = [], record, courseId, onChangeRoleSucces } > - 修改角色 + 修改角色 ) }