Merge branches 'PCqiandao' and 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into PCqiandao

PCqiandao
杨树明 5 years ago
commit ccbf4cdde3

@ -560,6 +560,8 @@ class CoursesController < ApplicationController
member = CourseMember.create(course_id: @course.id, graduation_group_id: @graduation_group_id, user_id: user_id, role: role, is_active: is_active)
member.teacher_course_groups << TeacherCourseGroup.new(course_group_id: @course_group_id, user_id: user_id, course_id: @course.id) if @course_group_id != 0
@course.course_messages.join_course_requests.unhandled.where(course_message_id: user_id).update_all(status: :PASSED)
end
end
TeacherInviteJoinCourseNotifyJob.perform_later(current_user.id, @course.id, role, teacher_ids) if teacher_ids.present?

@ -42,6 +42,10 @@ class FilesController < ApplicationController
@unpublish_count = @total_count - @publish_count
@attachments = @attachments.by_keywords(params[:search])
if params[:no_link]
@attachments = @attachments.where(link: nil)
end
@attachments = @attachments.page(@page).per(@page_size)
end

Loading…
Cancel
Save