From b23d3ccfd7818eddb12873544979818f48230fad Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 23 Jul 2019 19:00:43 +0800 Subject: [PATCH 1/7] beian --- public/images/educoder/beian.png | Bin 0 -> 19256 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100755 public/images/educoder/beian.png diff --git a/public/images/educoder/beian.png b/public/images/educoder/beian.png new file mode 100755 index 0000000000000000000000000000000000000000..9f763946dd6606addeab24e40e2369124d53a048 GIT binary patch literal 19256 zcmeI4c{G&a_rPDYSRz?cRHh**jbW@aG4@bIvPT-TFwB@~W-OyD?Wzv>B_s{Rld(O-|_qor#_kBLkeeV0rob%2J%k9R3{F3|t z00^3z7+NvUVlyw^Ma=h*6RQQ8CqA-?0~G)SL}y-HKwQEK0N^*r8yHwxx|3)msym4c zGBq#&ktrk`o`3}azm~+EzV=b$%aQHl*rm4m&BNDY2nPVL41>2y*dbLo5_Jg5x422i0+8_A>U(Yr%K>1Rhwc|hyQVY6b(I8g z1LQ_US&_n%Gm*+2%rNj(k;LhZUs~+T33kyRV#pNJ8xk4foK3A(D&AUo>^XyWe)cdW-8O z41Fk1{o*-H0wdRsw0|i)&Ak8+-d;D<;?mXC#6zy+y5?QtnYjySu?5`QC!AGU`H~&^ zANx<7qH9j+u1QLYs+S*2-* zruU+}e6p=VyQ>%ID|?N1%Y3Ok5;PsUq5ie%b*D|@Cr9j0t?AQ$&3A^Qd&KsRs{a#~U#0uXjnh0(_WAgW{{ zOjm&mcodWV1^^1*t#G;&En!x{3jl`62R2^QTfF417^74u;qL0fQVDLe2muY_~&Dr*XMcZfJ0=p#!k+Os0*-ipGbd<*od zctufb5yzLghBkw1c_m^)7l2VFs*%Czpq}GmJHX{tlyvS)eUAud6PfoAiWoe^N%wPj zYZVA~a_VHEv2yf*oEYwr>QP=4nCXeSudHpMmzXcYDWFGciuE0 z;AAK|xL#QZcltTX>GUz9JtyoXyX@6$!_?5L?KOPFrAm`fL%g!wr-DWMd3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cYpLanKl}R?X&u+ucVMtrmV!7+O*yI-o|dp-*cZNNL)7}>+q&x=$_fqc zRWabVxDO_X3f^stE>Ar4Wa^_`tKZ1PvQWqPlvgSqc0DlcOT^jq6I>X-!EVInMRKw6 z3!LJwp^461HaCijqH5mMO-3(Qd|&-a9{pyoTxhFPWZrP;MW}q)Mq22H`fNDkx%+V6 z;_SVnPt^!6#&sT-F5X&}Kenpy?fNiVi?4&%RN5=9e6ox~O&b^(jv^M=9K5`hdUtJ6 zwm_4QLFT;=tucEe9Ym)2T#FX<90=Havu0c;{ID=UbNm`W=$Sh3jQg3X9WucZfs&D?-Eu+@Lke}9aJ|NSbNy((&o`0*Er=e{`d^2D6Y($o+8 z&(#h|f-dFpG8V0nJc&y!PcCXpx4E2hbzlqh?Z{bTTh2OH&p7!^vFlJznHIYppWYp5 zdlp#~Va9cJjmV;nsN@bsN05F?BjV8mBiVJ_k%#xC>C4JRef3#;Wo1*H{;@`g=hl<% z8i>A|heqs103%Lk@{07bBdr~)XsW#%skOpUf1X6x@c_#dhPKRf^c literal 0 HcmV?d00001 From 0d82cc7a2c4b3559f99b502be0740e06a4912335 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 23 Jul 2019 21:22:19 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E9=80=89=E7=94=A8=E9=A2=98=E5=BA=93?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/question_banks_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/question_banks_controller.rb b/app/controllers/question_banks_controller.rb index e30065d09..8f295fa95 100644 --- a/app/controllers/question_banks_controller.rb +++ b/app/controllers/question_banks_controller.rb @@ -147,15 +147,17 @@ class QuestionBanksController < ApplicationController new_homework.homework_detail_group.base_on_project = homework.base_on_project end # 附件 + logger.info("######attachments: #{homework.attachments.count}") 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 + att.save! new_homework.attachments << att end + logger.info("######new_homework.attachments: #{new_homework.attachments.count}") if new_homework.save new_homework_detail_manual.save if new_homework_detail_manual From a5ecdac73da1afaf432965db194dde247349cb6a Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Tue, 23 Jul 2019 21:26:19 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E4=BF=AE=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shixuns_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index be4448a92..9edb6bb9d 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -830,8 +830,6 @@ private def is_shixun_reset?(games, min_challenges, current_myshixun) # 用户在申请发布之前,是否玩过实训 TODO: 重置的字段应该迁移到myshixuns表比较合适 modify_shixun = ShixunModify.exists?(:myshixun_id => current_myshixun.id, :shixun_id => @shixun.id, :status => 1) - games.size != min_challenges.size || - games.map(&:challenge_id) != min_challenges.map{|challenge| challenge.first} || - modify_shixun + games.size != min_challenges.size || modify_shixun end end From 86f872e6271221fcc1c65b308491b0b8a809a4bd Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 23 Jul 2019 21:41:20 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E5=88=86=E7=BB=84=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E9=80=89=E7=94=A8=E9=A2=98=E5=BA=93=E9=99=84=E4=BB=B6=E6=89=BE?= =?UTF-8?q?=E4=B8=8D=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/question_banks_controller.rb | 25 ++++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/app/controllers/question_banks_controller.rb b/app/controllers/question_banks_controller.rb index 8f295fa95..76600c6a2 100644 --- a/app/controllers/question_banks_controller.rb +++ b/app/controllers/question_banks_controller.rb @@ -148,22 +148,21 @@ class QuestionBanksController < ApplicationController end # 附件 logger.info("######attachments: #{homework.attachments.count}") - 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 - logger.info("######new_homework.attachments: #{new_homework.attachments.count}") - - if new_homework.save + 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.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 From ca0e04953e40e0a9eae94b2e02d081b0748e5f7e Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 23 Jul 2019 21:51:22 +0800 Subject: [PATCH 5/7] new date --- .../src/modules/courses/busyWork/CommonWorkSetting.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js index dbae81411..8d752707c 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js @@ -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: 多项评分配比 From a0985a63cc4541cf6ff69cb1f7bf22b3a3cbf70b Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 23 Jul 2019 21:57:38 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E9=A2=98=E5=BA=93=E9=80=89=E7=94=A8?= =?UTF-8?q?=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/question_banks_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/question_banks_controller.rb b/app/controllers/question_banks_controller.rb index 76600c6a2..58fa7a8d4 100644 --- a/app/controllers/question_banks_controller.rb +++ b/app/controllers/question_banks_controller.rb @@ -154,6 +154,7 @@ class QuestionBanksController < ApplicationController 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 From 1974d858edb862596ac968b90e345d93b3e63a76 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 23 Jul 2019 22:04:22 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E9=99=84=E4=BB=B6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_commons_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb index 8fab8dad3..8e489df1b 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -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