|
|
|
@ -428,6 +428,17 @@ class CoursesService
|
|
|
|
|
result
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# 课程课件
|
|
|
|
|
def course_attachments params
|
|
|
|
|
result = []
|
|
|
|
|
@course = Course.find(params[:course_id])
|
|
|
|
|
@attachments = @course.attachments.order("created_on desc")
|
|
|
|
|
@attachments.each do |atta|
|
|
|
|
|
result << {:filename => atta.filename,:description => atta.description,:downloads => atta.downloads,:quotes => atta.quotes.nil? ? 0 :atta.quotes }
|
|
|
|
|
end
|
|
|
|
|
result
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
|
def show_homework_info course,bid,current_user,is_course_teacher
|
|
|
|
|
author_real_name = bid.author.lastname + bid.author.firstname
|
|
|
|
|