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..cb3ff0d2f 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, @@ -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] diff --git a/dump.rdb b/dump.rdb index f7b65ded0..6d0966fe0 100644 Binary files a/dump.rdb and b/dump.rdb differ