video_transcode
cxt 5 years ago
parent 4d853aac7f
commit 1ba5860d5a

@ -19,6 +19,7 @@ class Weapps::CourseMemberAttendancesController < ApplicationController
end
@members = @members.joins(:course_member_attendances).order("attendance_status=1 desc, course_member_attendances.updated_at desc")
@members_count = @members.uniq.count
@members = paginate @members.preload(user: :user_extension).uniq
# @member_attendances = @member_attendances.where(attendance_status: params[:attendance_status]) if params[:attendance_status].present?

@ -13,7 +13,7 @@ json.identifier shixun.identifier
json.name shixun.name
json.stu_num shixun.myshixuns_count
json.experience shixun.all_score
json.diffcult diff_to_s(shixun.trainee)
json.diffcult level_to_s(shixun.trainee)
json.score_info shixun.shixun_preference_info # todo: 这块可以改成只显示实训的平均分,不用每次都去取每种星的分数了。
json.is_jupyter shixun.is_jupyter
# 用于是否显示导航栏中的'背景知识'

@ -9,4 +9,6 @@ json.member_attendances @members.each do |member|
json.user_name member.user&.real_name
json.student_id member.user&.student_id
json.attendance_status @member_attendances.select{|attendance| attendance.course_member_id == member.id}.first&.attendance_status || "ABSENCE"
end
end
json.members_count @members_count
Loading…
Cancel
Save