You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/views/homework_commons/group_list.json.jbuilder

17 lines
570 B

json.group_list do
json.array! @course_groups do |course_group|
json.id course_group.id
json.name course_group.name
json.works_count homework_works_count @homework, course_group
json.last_review_time last_review_time @homework, course_group
end
end
# 未分班展示情况放在最后
if @course_groups.count < @limit.to_i
json.ungroup_list do
json.id 0
json.name "未分班"
json.work_count homework_ungroup_works_count @homework, @ungroup_user_ids
json.last_review_time ungroup_last_review_time @homework
end
end