Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

courseware
cxt 5 years ago
commit bbac059efb

@ -99,7 +99,7 @@ class CoursesController < ApplicationController
limit = params[:limit] || 16
@courses = @courses.page(page).per(limit)
@courses = @courses.preload(:school, :none_hidden_course_modules, teacher: :user_extension)
@courses = @courses.preload(:school, :none_hidden_course_modules, :teacher_users, teacher: :user_extension)
end
def course_videos

@ -13,5 +13,6 @@ json.courses @courses do |course|
json.is_end course.is_end
json.first_category_url module_url(course.none_hidden_course_modules.first, course)
json.excellent course.excellent
json.teacher_users course.teacher_users.select{|u| u.id != course.tea_id }.map(&:real_name)[0..2] # 取前3名老师
end
json.courses_count @courses_count

Loading…
Cancel
Save