|
|
|
@ -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]
|
|
|
|
|