Merge branch 'dev_aliyun' into develop

dev_forum
cxt 5 years ago
commit 23baa07b3d

@ -1593,7 +1593,7 @@ class HomeworkCommonsController < ApplicationController
homework_bank.max_num = homework.homework_detail_group.max_num
homework_bank.base_on_project = homework.homework_detail_group.base_on_project
end
homework.attachments.each do |attachment|
homework.attachments.where("attachtype != 2 and attachtype is null").each do |attachment|
att = attachment.copy
att.author_id = homework_bank.user_id
att.copy_from = attachment.id

@ -147,21 +147,23 @@ class QuestionBanksController < ApplicationController
new_homework.homework_detail_group.base_on_project = homework.base_on_project
end
# 附件
homework.attachments.try(:each) do |attachment|
att = attachment.copy
att.container_id = nil
att.container_type = nil
att.author_id = homework.user_id
att.copy_from = attachment.id
att.save
new_homework.attachments << att
end
if new_homework.save
logger.info("######attachments: #{homework.attachments.count}")
if new_homework.save!
homework.attachments.try(:each) do |attachment|
att = attachment.copy
att.container_id = nil
att.container_type = nil
att.author_id = homework.user_id
att.attachtype = 1
att.copy_from = attachment.id
att.save!
new_homework.attachments << att
end
logger.info("######new_homework.attachments: #{new_homework.attachments.count}")
new_homework_detail_manual.save if new_homework_detail_manual
new_homework.homework_detail_group.save if new_homework.homework_detail_group
HomeworksService.new.create_works_list(new_homework, course)
homework.update_column(:quotes, homework.quotes+1)
homework.update_column(:quotes, homework.quotes + 1)
end
new_homework
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

@ -715,18 +715,18 @@ class CommonWorkSetting extends Component{
course_id ,
unified_setting: unified_setting, // 统一设置
group_settings: group_settings_param,
publish_time: temp_publish_time, // 发布
end_time: temp_end_time, // 截止
publish_time: new Date(temp_publish_time), // 发布
end_time: new Date(temp_end_time), // 截止
late_penalty: late_penalty, // 迟交扣分
allow_late: allow_late, // 是否允许补交
late_time: late_time, // 补交截止时间
late_time: new Date(late_time), // 补交截止时间
anonymous_comment: anonymous_comment, // true: 启用匿评 false:未启用匿评
evaluation_start: evaluation_start, //匿评开始时间
evaluation_start: new Date(evaluation_start), //匿评开始时间
evaluation_end: evaluation_end,
evaluation_num: evaluation_num, // 匿评数
absence_penalty: absence_penalty, // 匿评扣分
anonymous_appeal: anonymous_appeal, // true: 启用匿评申诉, false:未启用
appeal_time: appeal_time, // 申诉结束时间
appeal_time: new Date(appeal_time), // 申诉结束时间
appeal_penalty: appeal_penalty, // 违规匿评扣分
ta_mode: ta_mode, // 1:普通模式 0:复审模式
final_mode: final_mode, // true: 单项评分优先, false: 多项评分配比

Loading…
Cancel
Save