From 9e13ffd316042691cccde6f3e843f7d56bb84480 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 22 Aug 2019 15:14:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 2 +- app/controllers/courses_controller.rb | 2 +- dump.rdb | Bin 2086 -> 2197 bytes 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index bb053d9c0..746fb1b02 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -568,7 +568,7 @@ class ApplicationController < ActionController::Base end def strf_date(date) - date.blank? ? '' : Time.parse(date).strftime("%Y-%m-%d") + date.blank? ? '' : date.to_date.strftime("%Y-%m-%d") end def logger_error(error) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index d05866af3..de9ba7571 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -26,7 +26,7 @@ class CoursesController < ApplicationController :base_info, :get_historical_courses, :create_group_by_importing_file, :attahcment_category_list,:export_member_scores_excel, :duplicate_course, :switch_to_teacher, :switch_to_assistant, :switch_to_student, :exit_course, - :informs, :update_informs, :online_learning, :update_task_position, :tasks_list] + :informs, :update_informs, :online_learning, :update_task_position, :tasks_list, :join_excellent_course] before_action :user_course_identity, except: [:join_excellent_course, :index, :create, :new, :apply_to_join_course, :search_course_list, :get_historical_course_students, :mine, :search_slim] before_action :teacher_allowed, only: [:update, :destroy, :settings, :search_teacher_candidate, diff --git a/dump.rdb b/dump.rdb index f7b65ded0f6f907e3c844f02d8fb1c6dbac91345..6d0966fe01363d6fdffde4613c80093b36eeed0d 100644 GIT binary patch delta 486 zcmWO0y=zlJ008iN?_J_c`axnPj(JIF#L9(x_kB)nsSr^IC4++>+{1y<6ON|Eg8>GHla8_wP~8{P9c7lLuA86LREQBhY<5Fm@ z*nktNu?%&%A7xcWNWOIhR}=6z>?So*V5*9eBHL@V5YyTqMVLmoFh*Lbw4kz+g?Gs* zO3G4GV+;Q=X~S>niBO5&abbN|DCOiGXMYp delta 365 zcmV~$J4+lv007|GncKbdFvnd`Qi$GWB@hBD^L|)qp`;N4Ns)jd%-+m(r{IGm#i5mr zg@*AOK}eNGLll327%VN!KL|^ZGyzKqQSyC*)|cikZXI8~eEYYyzUp1x^S$p^t0%MH zqSpHt6YYs60AmdRY5>gMg$Qniee@(8!I?;hKk)U&BPodMXiTi?QcJsrD@&YaJl!7e zta!WT-8;LMO%ox7l16AgB`7mk(R3Ls*^fW#X_Zq-`u6~42>dG#QJWT+>7v7O*C9pD zjj_3=+~l~hRyn1SkxV^K%QG|*MCB(O5{D=)Kk3%EL;)r(3^B|MOcrv@5tDX*$+o;z1yz}+uQ@{Bi D4+Cm! From 1bde2b644f3e2b4f50160b57211fad9f5e0cd43d Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 22 Aug 2019 15:19:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=9C=A8=E6=96=B0=E5=BB=BA=E5=BC=80?= =?UTF-8?q?=E6=94=BE=E8=AF=BE=E5=A0=82=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C?= =?UTF-8?q?=E5=B0=86=E5=AE=9E=E8=B7=B5=E8=AF=BE=E7=A8=8B=E7=9A=84=E2=80=9C?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E9=A1=BB=E7=9F=A5=E2=80=9D=E5=86=99=E5=85=A5?= =?UTF-8?q?=E8=AF=BE=E5=A0=82=E5=85=AC=E5=91=8A=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index de9ba7571..cb3ff0d2f 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -158,6 +158,8 @@ class CoursesController < ApplicationController @course.subject.subject_members.where.not(user_id: current_user.id).each do |s_member| CourseMember.create!(course_id: @course.id, user_id: s_member.user_id, role: 2) end + + Inform.create(container: @course, description: @subject.learning_notes) end course_module_types = params[:course_module_types]