课堂选用实训

dev_video
cxt 5 years ago
parent 74992bcc2b
commit 8636f2d2e8

@ -4,12 +4,17 @@ json.courses @courses do |course|
json.created_at course.created_at
end
json.stages @subject.stages do |stage|
json.stages @subject.stages.includes(shixuns: [user: :user_extension]) do |stage|
index = 1
json.shixuns stage.shixuns do |shixun|
if shixun.status == 2 && !@none_shixun_ids.include?(shixun.id)
if shixun.status == 2 && !shixun.is_jupyter && !@none_shixun_ids.include?(shixun.id)
json.shixun_id shixun.id
json.shixun_name "#{stage.position}-#{index} #{shixun.name}"
json.title shixun.name
json.level level_to_s(shixun.trainee)
json.study_count shixun.myshixuns_count
json.author_name shixun.user.real_name
json.author_img url_to_avatar(shixun.user)
end
index += 1
end

@ -4,7 +4,6 @@ json.shixun_list @results do |obj|
json.level level_to_s(obj.trainee)
json.study_count obj.myshixuns_count
json.author_name obj.user.real_name
json.author_school_name obj.user.school_name
json.author_img url_to_avatar(obj.user)
end
json.shixuns_count @total_count
Loading…
Cancel
Save