|
|
|
@ -27,7 +27,7 @@ class CoursesController < ApplicationController
|
|
|
|
|
: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,
|
|
|
|
|
:join_excellent_course, :export_couser_info, :export_member_act_score, :new_informs]
|
|
|
|
|
:join_excellent_course, :export_couser_info, :export_member_act_score, :new_informs, :delete_informs]
|
|
|
|
|
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, :board_list]
|
|
|
|
|
before_action :teacher_allowed, only: [:update, :destroy, :settings, :search_teacher_candidate,
|
|
|
|
@ -36,7 +36,7 @@ class CoursesController < ApplicationController
|
|
|
|
|
:add_teacher, :export_couser_info, :export_member_act_score]
|
|
|
|
|
before_action :admin_allowed, only: [:set_invite_code_halt, :set_public_or_private, :change_course_admin,
|
|
|
|
|
:set_course_group, :create_group_by_importing_file, :update_informs, :new_informs,
|
|
|
|
|
:update_task_position, :tasks_list]
|
|
|
|
|
:update_task_position, :tasks_list, :delete_informs]
|
|
|
|
|
before_action :teacher_or_admin_allowed, only: [:graduation_group_list, :create_graduation_group, :join_graduation_group,
|
|
|
|
|
:change_course_teacher, :course_group_list,
|
|
|
|
|
:teacher_application_review, :apply_teachers, :delete_course_teacher]
|
|
|
|
@ -257,6 +257,12 @@ class CoursesController < ApplicationController
|
|
|
|
|
normal_status("更新成功")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def delete_informs
|
|
|
|
|
inform = @course.informs.find_by(id: params[:inform_id])
|
|
|
|
|
inform.destroy!
|
|
|
|
|
normal_status("删除成功")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def online_learning
|
|
|
|
|
@subject = @course.subject
|
|
|
|
|
@stages = @subject&.stages
|
|
|
|
|