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? diff --git a/app/jobs/apply_teacher_role_join_course_notify_job.rb b/app/jobs/apply_teacher_role_join_course_notify_job.rb index 3ae5e32db..ab5a9e354 100644 --- a/app/jobs/apply_teacher_role_join_course_notify_job.rb +++ b/app/jobs/apply_teacher_role_join_course_notify_job.rb @@ -8,7 +8,7 @@ class ApplyTeacherRoleJoinCourseNotifyJob < ApplicationJob return if user.blank? || course.blank? attrs = %i[user_id trigger_user_id container_id container_type belong_container_id - belong_container_type tiding_type extra created_at updated_at] + belong_container_type tiding_type status extra created_at updated_at] same_attrs = { trigger_user_id: user.id, container_id: course.id, container_type: 'JoinCourse', status: 0, diff --git a/app/models/course_message.rb b/app/models/course_message.rb index 7774dbf0c..a3578d500 100644 --- a/app/models/course_message.rb +++ b/app/models/course_message.rb @@ -32,6 +32,6 @@ class CourseMessage < ApplicationRecord belong_container: course, extra: content.to_i == 2 ? '9' : '7', tiding_type: 'System', status: deal_status ) # 将申请消息置为已处理 - Tiding.where(trigger_user_id: user_id, container_id: course_id, container_type: 'JoinCourse', status: 0).update_all(status: 1) + Tiding.where(trigger_user_id: course_message_id, container_id: course_id, container_type: 'JoinCourse', status: 0).update_all(status: 1) end end \ No newline at end of file diff --git a/app/models/student_graduation_topic.rb b/app/models/student_graduation_topic.rb index 50f150f92..b8f4dfbbb 100644 --- a/app/models/student_graduation_topic.rb +++ b/app/models/student_graduation_topic.rb @@ -21,7 +21,7 @@ class StudentGraduationTopic < ApplicationRecord def send_tiding self.tidings << Tiding.new(:user_id => self.graduation_topic.tea_id, :trigger_user_id => self.user_id, :parent_container_id => self.graduation_topic_id, :parent_container_type => "GraduationTopic", - :belong_container_id => self.graduation_topic.course_id, :belong_container_type => "Course", :viewed => 0, :status => 0, :tiding_type => "GraduationTopic") + :belong_container_id => self.graduation_topic.course_id, :belong_container_type => "Course", :viewed => 0, :status => 0, :tiding_type => "Apply") end # 学生名称 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?:""} + {item.delete===true?:""}
) })} 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 });