From 3073d699936a3d5d96be7c950a9ca9d7ee3f1ffa Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Fri, 20 Sep 2019 09:48:03 +0800
Subject: [PATCH 1/3] =?UTF-8?q?tab=E4=B8=8D=E8=BD=AC=E7=A9=BA=E6=A0=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/page/component/monaco/TPIMonaco.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/public/react/src/modules/page/component/monaco/TPIMonaco.js b/public/react/src/modules/page/component/monaco/TPIMonaco.js
index a9820ad27..0d5eb2d34 100644
--- a/public/react/src/modules/page/component/monaco/TPIMonaco.js
+++ b/public/react/src/modules/page/component/monaco/TPIMonaco.js
@@ -290,6 +290,7 @@ class TPIMonaco extends Component {
// theme: "vs-dark",
theme: "myCoolTheme",
+ insertSpaces: false,
fontSize: this.state.cmFontSize
});
From cdd80e0c09dd34a8d0487a52bab1e495816e2bbe Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Fri, 20 Sep 2019 09:59:39 +0800
Subject: [PATCH 2/3] onAttachmentRemove
---
.../react/src/modules/courses/busyWork/CommonWorkAppraise.js | 4 +++-
.../courses/busyWork/CommonWorkAppraiseReviseAttachments.js | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js
index dc82de540..f41528657 100644
--- a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js
+++ b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js
@@ -248,7 +248,9 @@ class CommonWorkAppraise extends Component{
}
-
+
{is_evaluation != true && project_info && project_info.name &&
diff --git a/public/react/src/modules/courses/busyWork/CommonWorkAppraiseReviseAttachments.js b/public/react/src/modules/courses/busyWork/CommonWorkAppraiseReviseAttachments.js
index d12099d38..b487af487 100644
--- a/public/react/src/modules/courses/busyWork/CommonWorkAppraiseReviseAttachments.js
+++ b/public/react/src/modules/courses/busyWork/CommonWorkAppraiseReviseAttachments.js
@@ -33,7 +33,7 @@ function CommonWorkAppraiseReviseAttachments(props) {
{item.title}
{item.filesize}
- {item.delete===true?this.onAttachmentRemove(item.id)}>:""}
+ {item.delete===true?this.props.onAttachmentRemove(item.id)}>:""}
)
})}
From 43f055a3cca2cea0bd99db0f5b6ce78be8ac87de Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Fri, 20 Sep 2019 10:06:08 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E8=A1=A5=E4=BA=A4=E4=BD=9C=E4=B8=9A?=
=?UTF-8?q?=E9=99=84=E4=BB=B6=E4=B8=8D=E8=A6=86=E7=9B=96=E4=B8=8A=E6=AC=A1?=
=?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=9A=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/student_works_controller.rb | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/app/controllers/student_works_controller.rb b/app/controllers/student_works_controller.rb
index ab62cbd45..2612510c5 100644
--- a/app/controllers/student_works_controller.rb
+++ b/app/controllers/student_works_controller.rb
@@ -321,11 +321,12 @@ class StudentWorksController < ApplicationController
ActiveRecord::Base.transaction do
begin
- revise_attachment = @work.attachments.where(attachtype: 7).reorder("created_on desc").last
- if revise_attachment.present? && @work.student_works_scores.where("created_at > '#{revise_attachment.created_on}'
- and score is not null").count == 0
- revise_attachment.destroy
- end
+ # 补交作业附件不覆盖之前上传的附件
+ # revise_attachment = @work.attachments.where(attachtype: 7).reorder("created_on desc").last
+ # if revise_attachment.present? && @work.student_works_scores.where("created_at > '#{revise_attachment.created_on}'
+ # and score is not null").count == 0
+ # revise_attachment.destroy
+ # end
Attachment.associate_container(params[:attachment_ids], @work.id, @work.class, 7)
revise_attachment = Attachment.where(attachtype: 7, container_id: @work.id, container_type: "StudentWork").last
revise_attachment.update_attributes(description: params[:description]) if revise_attachment.present?