作业启用匿评的默认设置出错,只余一天的期间了
This commit is contained in:
parent
679a6274e6
commit
149b837aff
|
@ -156,7 +156,7 @@ class HomeworkCommonController < ApplicationController
|
|||
|
||||
eval_start = homework_detail_manual.evaluation_start
|
||||
if eval_start.nil? || (Time.parse(eval_start.to_s) <= @homework.end_time && homework_detail_manual.comment_status <= 1)
|
||||
homework_detail_manual.evaluation_start = @homework.end_time + 7
|
||||
homework_detail_manual.evaluation_start = (@homework.end_time + 7*24*60*60).strftime("%Y-%m-%d")
|
||||
homework_detail_manual.evaluation_end = homework_detail_manual.evaluation_start + 7
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1436,8 +1436,8 @@ class UsersController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
homework_detail_manual.evaluation_start = homework.end_time + 7 if homework.end_time
|
||||
homework_detail_manual.evaluation_end = homework.end_time + 14 if homework.end_time
|
||||
homework_detail_manual.evaluation_start = (homework.end_time + 7*24*60*60).strftime("%Y-%m-%d") if homework.end_time
|
||||
homework_detail_manual.evaluation_end = homework_detail_manual.evaluation_start + 7 if homework.end_time
|
||||
homework_detail_manual.evaluation_num = params[:evaluation_num] || 3
|
||||
homework_detail_manual.absence_penalty = 0
|
||||
homework.homework_detail_manual = homework_detail_manual
|
||||
|
|
|
@ -111,8 +111,9 @@ class HomeworkCommon < ActiveRecord::Base
|
|||
#作业微信通知delay
|
||||
def send_homework_wechat_message_delay
|
||||
self.course.members.each do |m|
|
||||
# if m.user_id != self.user_id
|
||||
#self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false)
|
||||
if m.user_id != self.user_id
|
||||
self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false)
|
||||
end
|
||||
rolesids = []
|
||||
m.roles.each do |role|
|
||||
rolesids << role.id
|
||||
|
|
Loading…
Reference in New Issue