diff --git a/app/controllers/exercises_controller.rb b/app/controllers/exercises_controller.rb index 6f121db5f..e92c3b266 100644 --- a/app/controllers/exercises_controller.rb +++ b/app/controllers/exercises_controller.rb @@ -703,12 +703,14 @@ class ExercisesController < ApplicationController end if ex_status == 1 #如果试卷存在已发布的,或者是已截止的,那么则直接跳过 g_course = params[:group_ids] #表示是否传入分班参数,如果传入分班的参数,那么试卷的统一设置需修改 + tiding_group_ids = g_course if g_course user_course_groups = @course.charge_group_ids(current_user) if g_course.map(&:to_i).sort == user_course_groups.sort # 如果是设置为全部班级,则试卷不用分组,且试卷设定为统一设置,否则则分组设置 exercise.exercise_group_settings.destroy_all ex_unified = true e_time = ex_end_time + tiding_group_ids = [] else ex_unified = false g_course.each do |i| @@ -748,7 +750,7 @@ class ExercisesController < ApplicationController if exercise.course_acts.size == 0 exercise.course_acts << CourseActivity.new(:user_id => exercise.user_id,:course_id => exercise.course_id) end - ExercisePublishNotifyJob.perform_later(exercise.id, g_course) + ExercisePublishNotifyJob.perform_later(exercise.id, tiding_group_ids) end end end @@ -1084,6 +1086,7 @@ class ExercisesController < ApplicationController :subjective_score => subjective_score } @answer_committed_user.update_attributes(commit_option) + CommitExercsieNotifyJobJob.perform_later(@exercise.id, current_user.id) normal_status(0,"试卷提交成功!") end rescue Exception => e diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb index 7d978d722..ba3030424 100644 --- a/app/controllers/polls_controller.rb +++ b/app/controllers/polls_controller.rb @@ -919,6 +919,7 @@ class PollsController < ApplicationController :end_at => Time.now } poll_user_current.update_attributes(poll_user_params) + CommitPollNotifyJobJob.perform_later(@poll.id, current_user.id) normal_status(0, "问卷提交成功!") end ## 需添加发送消息的接口,稍后添加 diff --git a/app/decorators/tiding_decorator.rb b/app/decorators/tiding_decorator.rb index 30a325cd3..d1f6f08e6 100644 --- a/app/decorators/tiding_decorator.rb +++ b/app/decorators/tiding_decorator.rb @@ -47,13 +47,13 @@ module TidingDecorator # ================ 各种类消息内容方法 ================ def apply_user_authentication_content - return if trigger_user_id.zero? + t_user = trigger_user || User.find(1) if tiding_type == 'Apply' str1, str2 = if container.auth_type == 1 - [trigger_user.show_real_name, trigger_user.ID_number] + [t_user.show_real_name, t_user.ID_number] elsif container.auth_type == 2 - ue = trigger_user.user_extension + ue = t_user.user_extension [[ue.school&.name, ue.department&.name].join('_'), ue.identity_text] end I18n.t(locale_format(tiding_type, container.auth_type)) % [str1, str2] @@ -97,7 +97,7 @@ module TidingDecorator elsif status == 2 I18n.t(locale_format(tiding_type, "#{status}_#{extra.nil?}"), reason: extra) % [name, second_name] else - I18n.t(locale_format(tiding_type, status)) % [name, second_name] + I18n.t(locale_format(tiding_type, status), reason: extra) % [name, second_name] end end @@ -106,9 +106,9 @@ module TidingDecorator if tiding_type == 'Apply' I18n.t(locale_format(tiding_type)) % name elsif status == 2 - I18n.t(locale_format(tiding_type, "#{status}_#{extra.nil?}"), reason: extra) % name + I18n.t(locale_format(tiding_type, "#{status}_#{extra.nil?}"), name: name, reason: extra) else - I18n.t(locale_format(tiding_type, status)) % name + I18n.t(locale_format(tiding_type, status), name: name, reason: extra) end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 5040acec0..7e9fd652b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -130,15 +130,15 @@ module ApplicationHelper if source.class.to_s == 'User' File.join(relative_path, ["#{source.class}", "#{source.id}"]) else - File.join("avatars", ["#{source.class}", "#{source.id}"]) + File.join("images/avatars", ["#{source.class}", "#{source.id}"]) end elsif source.class.to_s == 'User' str = source.user_extension.try(:gender).to_i == 0 ? "b" : "g" File.join(relative_path, "#{source.class}", str) elsif source.class.to_s == 'Subject' - File.join("educoder", "index", "subject", "subject#{rand(17)}.jpg") + File.join("images","educoder", "index", "subject", "subject#{rand(17)}.jpg") elsif source.class.to_s == 'Shixun' - File.join("educoder","index", "shixun", "shixun#{rand(23)}.jpg") + File.join("images","educoder", "index", "shixun", "shixun#{rand(23)}.jpg") end end diff --git a/app/jobs/commit_exercsie_notify_job_job.rb b/app/jobs/commit_exercsie_notify_job_job.rb new file mode 100644 index 000000000..1be0bb2bc --- /dev/null +++ b/app/jobs/commit_exercsie_notify_job_job.rb @@ -0,0 +1,26 @@ +class CommitExercsieNotifyJobJob < ApplicationJob + queue_as :notify + + def perform(exercise_id, user_id) + exercise = Exercise.find_by(id: exercise_id) + user = User.find_by(id: user_id) + return if [exercise, user].any?(&:blank?) + course = exercise.course + + attrs = %i[user_id trigger_user_id container_id container_type parent_container_id parent_container_type + belong_container_id belong_container_type tiding_type viewed status created_at updated_at] + + same_attrs = { + trigger_user_id: user.id, + container_id: exercise.id, container_type: 'Exercise', + parent_container_id: exercise.id, parent_container_type: 'CommitExercise', + belong_container_id: course.id, belong_container_type: 'Course', + tiding_type: 'Exercise', viewed: 0, status: 0 + } + Tiding.bulk_insert(*attrs) do |worker| + course.course_member(user).member_teachers.each do |teacher| + worker.add same_attrs.merge(user_id: teacher.user_id) + end + end + end +end diff --git a/app/jobs/commit_poll_notify_job_job.rb b/app/jobs/commit_poll_notify_job_job.rb new file mode 100644 index 000000000..6953fa9e9 --- /dev/null +++ b/app/jobs/commit_poll_notify_job_job.rb @@ -0,0 +1,26 @@ +class CommitPollNotifyJobJob < ApplicationJob + queue_as :notify + + def perform(poll_id, user_id) + poll = Poll.find_by(id: poll_id) + user = User.find_by(id: user_id) + return if [poll, user].any?(&:blank?) + course = poll.course + + attrs = %i[user_id trigger_user_id container_id container_type parent_container_id parent_container_type + belong_container_id belong_container_type tiding_type viewed status created_at updated_at] + + same_attrs = { + trigger_user_id: user.id, + container_id: poll.id, container_type: 'Poll', + parent_container_id: poll.id, parent_container_type: 'CommitPoll', + belong_container_id: course.id, belong_container_type: 'Course', + tiding_type: 'Poll', viewed: 0, status: 0 + } + Tiding.bulk_insert(*attrs) do |worker| + course.course_member(user).member_teachers.each do |teacher| + worker.add same_attrs.merge(user_id: teacher.user_id) + end + end + end +end diff --git a/app/models/apply_user_authentication.rb b/app/models/apply_user_authentication.rb index c7fb5019e..d467eb850 100644 --- a/app/models/apply_user_authentication.rb +++ b/app/models/apply_user_authentication.rb @@ -3,8 +3,18 @@ class ApplyUserAuthentication < ApplicationRecord belongs_to :user + has_many :tidings, :as => :container, :dependent => :destroy + scope :real_name_auth, -> { where(auth_type: 1) } scope :professional_auth, -> { where(auth_type: 2) } scope :processing, -> { where(status: 0) } scope :passed, -> { where(status: 1) } + + after_create :send_tiding + + private + + def send_tiding + self.tidings << Tiding.new(:user_id => '1', :status=> 0, :trigger_user_id => user_id, :belong_container_id => 1, :belong_container_type =>'User', :tiding_type => "Apply") + end end diff --git a/app/models/journals_for_message.rb b/app/models/journals_for_message.rb index d5697d87f..4300ae9cc 100644 --- a/app/models/journals_for_message.rb +++ b/app/models/journals_for_message.rb @@ -11,6 +11,7 @@ class JournalsForMessage < ApplicationRecord scope :parent_comment, -> { where(m_parent_id: nil)} scope :search_by_jour_type, lambda{|type,ids| where(jour_type:type,jour_id: ids)} + has_many :tidings, as: :container, dependent: :destroy # "jour_type", # 留言所属类型 # "jour_id", # 留言所属类型的id diff --git a/app/models/student_graduation_topic.rb b/app/models/student_graduation_topic.rb index ea1774695..50f150f92 100644 --- a/app/models/student_graduation_topic.rb +++ b/app/models/student_graduation_topic.rb @@ -17,7 +17,12 @@ class StudentGraduationTopic < ApplicationRecord scope :is_refused, -> {where(status: 2)} scope :is_accepted, -> {where(status: 1)} scope :is_accepting, -> {where(status: 0)} + after_create :send_tiding + 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") + end # 学生名称 def name diff --git a/app/views/tidings/_tiding.json.jbuilder b/app/views/tidings/_tiding.json.jbuilder index c00670433..207d4b137 100644 --- a/app/views/tidings/_tiding.json.jbuilder +++ b/app/views/tidings/_tiding.json.jbuilder @@ -4,7 +4,15 @@ json.content tiding.content json.identifier tiding.identifier json.auth_type tiding.container_type == 'ApplyUserAuthentication' ? tiding.container.auth_type : nil -json.homework_type tiding.container_type == 'HomeworkCommon' ? tiding.container.homework_type : nil + +homework_type = nil +if tiding.container_type == 'HomeworkCommon' + homework_type = tiding.container.homework_type rescue nil +end +if homework_type.blank? && tiding.parent_container_type == 'HomeworkCommon' + homework_type = tiding.parent_container.homework_type rescue nil +end +json.homework_type homework_type json.time tiding.how_long_time json.new_tiding tiding.unread?(@onclick_time) diff --git a/config/locales/tidings/zh-CN.yml b/config/locales/tidings/zh-CN.yml index 456f15887..3fbfb88fa 100644 --- a/config/locales/tidings/zh-CN.yml +++ b/config/locales/tidings/zh-CN.yml @@ -38,8 +38,8 @@ Apply_end: "申请添加单位:%s" System: "1_end": "你提交的添加单位申请:%{name},审核已通过" - "2_reason_end": "你提交的添加单位申请:%{name},审核未通过
原因:%{reason}" - "2_no_reason_end": "你提交的添加单位申请:%{name},审核未通过" + "2_false_end": "你提交的添加单位申请:%{name},审核未通过
原因:%{reason}" + "2_true_end": "你提交的添加单位申请:%{name},审核未通过" "3_end": "你提交的添加单位申请:%{name},已被更改为:%{reason}" ApplyAction: ApplyShixun: @@ -164,7 +164,7 @@ NearlyEnd_end: "试卷的截止时间快到啦:%s" CommitExercise_end: "提交了试卷答题:%s" ExerciseScore_end: "评阅了你的试卷:%s" - StudentGraduationTopic_end: "选择了毕设选题:%s" + StudentGraduationTopic_end: "申请选择毕设选题:%s" DealStudentTopicSelect: 1_end: "你提交的选题申请:%s,审核已通过" 2_end: "你提交的选题申请:%s,审核未通过" @@ -195,11 +195,11 @@ ChallengeWorkScore_end: "调整了你的作品分数:%s" StudentWorksScoresAppeal: UserAppealResult: - 1_end: "同意了你提交的匿评申诉申请:%s" - 2_end: "拒绝了你提交的匿评申诉:%s" + 1_end: "你提交的匿评申诉申请:%s,审核已通过" + 2_end: "你提交的匿评申诉:%s,审核未通过" AppealResult: - 1_end: "同意了他人对你的匿评申诉申请:%s" - 2_end: "拒绝了他人对你的匿评申诉:%s" + 1_end: "别人对你的匿评发起的申诉申请:%s,审核已通过" + 2_end: "别人对你的匿评发起的申诉申请:%s,审核未通过" StudentWork: Apply_end: "发起了匿评申诉申请:%s" HomeworkCommon_end: "有人对你的匿评发起了申诉:%s" diff --git a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js index 17a944d41..8baee4b45 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js @@ -722,7 +722,7 @@ class CommonWorkSetting extends Component{ late_time: late_time ? new Date(late_time) : late_time, // 补交截止时间 anonymous_comment: anonymous_comment, // true: 启用匿评 false:未启用匿评 evaluation_start: evaluation_start ? new Date(evaluation_start) : evaluation_start, //匿评开始时间 - evaluation_end: evaluation_end, + evaluation_end: evaluation_end ? new Date(evaluation_end) : evaluation_end, evaluation_num: evaluation_num, // 匿评数 absence_penalty: absence_penalty, // 匿评扣分 anonymous_appeal: anonymous_appeal, // true: 启用匿评申诉, false:未启用 diff --git a/public/react/src/modules/forums/RecommendShixun.js b/public/react/src/modules/forums/RecommendShixun.js index aa9dec952..af0ca0007 100644 --- a/public/react/src/modules/forums/RecommendShixun.js +++ b/public/react/src/modules/forums/RecommendShixun.js @@ -28,7 +28,7 @@ class RecommendShixun extends Component {
- {`${_shixun.id}`} + {`${_shixun.id}`}
diff --git a/public/react/src/modules/message/js/Leftdialogue.js b/public/react/src/modules/message/js/Leftdialogue.js index b16746c70..c809bc9c9 100644 --- a/public/react/src/modules/message/js/Leftdialogue.js +++ b/public/react/src/modules/message/js/Leftdialogue.js @@ -53,7 +53,7 @@ class Leftdialogue extends Component{ -
+
this.mydelete(this.props.objeysl.sender.id,this.props.objeysl.id)} >删除
diff --git a/public/react/src/modules/message/js/MessagChat.js b/public/react/src/modules/message/js/MessagChat.js index 76057f38a..52c8d9870 100644 --- a/public/react/src/modules/message/js/MessagChat.js +++ b/public/react/src/modules/message/js/MessagChat.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import "../css/messagemy.css" -import {getImageUrl} from 'educoder'; +import {getImageUrl,markdownToHTML} from 'educoder'; import { Modal,Input,Icon,Tooltip,Spin} from 'antd'; import axios from 'axios'; import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor'; @@ -656,7 +656,7 @@ class MessagChat extends Component{

-

+

diff --git a/public/react/src/modules/message/js/MessagSub.js b/public/react/src/modules/message/js/MessagSub.js index bbbb7caa3..8b4c7d30d 100644 --- a/public/react/src/modules/message/js/MessagSub.js +++ b/public/react/src/modules/message/js/MessagSub.js @@ -4,7 +4,7 @@ import { Pagination, } from "antd"; import axios from 'axios'; -import {getImageUrl} from 'educoder'; +import {getImageUrl,markdownToHTML} from 'educoder'; import "../css/messagemy.css" //消息页面 class MessagSub extends Component{ @@ -212,35 +212,37 @@ class MessagSub extends Component{ return ''; case "HomeworkCommon" : //学生作业页 homework = parent_container_id - if(item.homework_type===1){ + if(item.homework_type==="normal"){ //普通作业 - return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) + return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/question`) } - if(item.homework_type===3){ + if(item.homework_type==="group"){ //分组作业 - return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) + return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/question`) } - if(item.homework_type===4){ + if(item.homework_type==="practice"){ //实训作业 - return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) + return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/`) } + return ""; case "GraduationTopic" : // 毕业目标页 parent_container_id return window.open(`/courses/${item.belong_container_id}/graduation_topics/${item.parent_container_id}/detail`) case "StudentWorksScore" : //学生作业页 - if(item.homework_type===1){ + if(item.homework_type==="normal"){ //普通作业 - return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) + return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/question`) } - if(item.homework_type===3){ + if(item.homework_type==="group"){ //分组作业 - return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) + return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/question`) } - if(item.homework_type===4){ + if(item.homework_type==="practice"){ //实训作业 - return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) + return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/`) } + return ""; } case "Memo" : // 交流问答页 :id = parent_container_id @@ -308,100 +310,103 @@ class MessagSub extends Component{ switch (item.parent_container_type) { case "AnonymousCommentFail" : // 课堂-作业列表 homework = container_id - if(item.homework_type===1){ + if(item.homework_type==="normal"){ //普通作业 return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===3){ + if(item.homework_type==="group"){ //分组作业 return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===4){ + if(item.homework_type==="practice"){ //实训作业 return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) } case "HomeworkPublish" : - if(item.homework_type===1){ + if(item.homework_type==="normal"){ //普通作业 return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===3){ + if(item.homework_type==="group"){ //分组作业 return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===4){ + if(item.homework_type==="practice"){ //实训作业 return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) } case "AnonymousAppeal" : - if(item.homework_type===1){ + if(item.homework_type==="normal"){ //普通作业 return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===3){ + if(item.homework_type==="group"){ //分组作业 return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===4){ + if(item.homework_type==="practice"){ //实训作业 return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) } default : // 课堂-作业列表 homework = container_id - if(item.homework_type===1){ + if(item.homework_type==="normal"){ //普通作业 return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===3){ + if(item.homework_type==="group"){ //分组作业 return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===4){ + if(item.homework_type==="practice"){ //实训作业 return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) } } case "StudentWork" : //课堂-作业 :id = container_id - if(item.homework_type===1){ + if(item.homework_type==="normal"){ //普通作业 return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.container_id}/list`) } - if(item.homework_type===3){ + if(item.homework_type==="group"){ //分组作业 return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.container_id}/list`) } - if(item.homework_type===4){ + if(item.homework_type==="practice"){ //实训作业 return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.container_id}/list?tab=0`) } case "StudentWorksScore" : //课堂-作业 :id = parent_container_id - if(item.homework_type===1){ - //普通作业 - return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) - } - if(item.homework_type===3){ - //分组作业 - return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) - } - if(item.homework_type===4){ - //实训作业 - return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) - } + // if(item.homework_type==="normal"){ + // //普通作业 + // return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) + // } + // if(item.homework_type==="group"){ + // //分组作业 + // return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) + // } + // if(item.homework_type==="practice"){ + // //实训作业 + // return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) + // } + return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.trigger_user.id}/${item.parent_container_id}/appraise`); + case "StudentWorksScoresAppeal" : - if(item.homework_type===1){ - //普通作业 - return window.open(`courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) - } - if(item.homework_type===3){ - //分组作业 - return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) - } - if(item.homework_type===4){ - //实训作业 - return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) - } + // if(item.homework_type==="normal"){ + // //普通作业 + // return window.open(`courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) + // } + // if(item.homework_type==="group"){ + // //分组作业 + // return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) + // } + // if(item.homework_type==="practice"){ + // //实训作业 + // return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) + // } + return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.trigger_user.id}/${item.parent_container_id}/appraise`); case "ChallengeWorkScore" : return ''; case "SendMessage" : @@ -412,7 +417,7 @@ class MessagSub extends Component{ return window.open(`/projects/${item.parent_container_id}/issues?remote=true`) case "Issue" : //项目Issue页 :id = container_id - return window.open(`/projects/${item.container_id}/issues?remote=true`) + return window.open(`/issues/${item.container_id}`) case "PullRequest" : // 项目pull request页 :id = parent_container_id return window.open(`/projects/${item.parent_container_id}/pull_requests`) @@ -441,6 +446,8 @@ class MessagSub extends Component{ return window.open(`/crowdsourcing/${item.container_id}`) // } } + case "Discuss": + return window.open(`/shixuns/${item.identifier}/shixun_discuss`); default : return window.open("/") } @@ -462,11 +469,11 @@ class MessagSub extends Component{
  • this.getdata("project_package",1)}>众包提醒
  • -
  • this.getdata("interactive",1)}>互动提醒
  • +
  • this.getdata("interaction",1)}>互动提醒
  • this.getdata("apply",1)}>审核
  • -
  • this.getdata("system",1)}>通知
  • +
  • this.getdata("notice",1)}>通知
  • @@ -495,6 +502,11 @@ class MessagSub extends Component{ if(item.parent_container_type==="Principal"){ boolps=false; } + if(item.parent_container_type==="HomeworkCommon"){ + if(item.homework_type===null||item.homework_type===undefined){ + boolps=false; + } + } } // if(item.container_type==="HomeworkCommon"){ // if(item.parent_container_type==="AnonymousAppeal"){ @@ -532,7 +544,7 @@ class MessagSub extends Component{ ` } -

    +

    diff --git a/public/react/src/modules/message/js/MessagePrivate.js b/public/react/src/modules/message/js/MessagePrivate.js index b41ba41a5..036ae99aa 100644 --- a/public/react/src/modules/message/js/MessagePrivate.js +++ b/public/react/src/modules/message/js/MessagePrivate.js @@ -5,7 +5,7 @@ import { } from "antd"; import axios from 'axios'; import moment from 'moment'; -import {getImageUrl} from 'educoder'; +import {getImageUrl,markdownToHTML} from 'educoder'; import "../css/messagemy.css" import WriteaprivateletterModal from '../messagemodal/WriteaprivateletterModal'; //私信页面 @@ -179,7 +179,7 @@ class MessagePrivate extends Component{ [{item.message_count}{"条"}] {moment(item.send_time).fromNow()}

    - + {item.unread === true ?:""} diff --git a/public/react/src/modules/message/js/Messagerouting.js b/public/react/src/modules/message/js/Messagerouting.js index f7e188361..2667127ca 100644 --- a/public/react/src/modules/message/js/Messagerouting.js +++ b/public/react/src/modules/message/js/Messagerouting.js @@ -205,11 +205,11 @@ class Messagerouting extends Component{ diff --git a/public/react/src/modules/message/js/Rightdialogue.js b/public/react/src/modules/message/js/Rightdialogue.js index 04c5f966d..a414f5d52 100644 --- a/public/react/src/modules/message/js/Rightdialogue.js +++ b/public/react/src/modules/message/js/Rightdialogue.js @@ -53,7 +53,7 @@ class Rightdialogue extends Component{ -
    +
    this.mydelete(this.props.objeysl.sender.id,this.props.objeysl.id)} >删除 diff --git a/spec/jobs/commit_exercsie_notify_job_job_spec.rb b/spec/jobs/commit_exercsie_notify_job_job_spec.rb new file mode 100644 index 000000000..17894c9ad --- /dev/null +++ b/spec/jobs/commit_exercsie_notify_job_job_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe CommitExercsieNotifyJobJob, type: :job do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/jobs/commit_poll_notify_job_job_spec.rb b/spec/jobs/commit_poll_notify_job_job_spec.rb new file mode 100644 index 000000000..da292f7fb --- /dev/null +++ b/spec/jobs/commit_poll_notify_job_job_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe CommitPollNotifyJobJob, type: :job do + pending "add some examples to (or delete) #{__FILE__}" +end