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

20 lines
713 B

6 years ago
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 != (@page - 1)*@limit.to_i && @course_groups.count < @limit.to_i
ungroup_work_count = homework_ungroup_works_count(@homework, @ungroup_user_ids)
if ungroup_work_count > 0
json.ungroup_list do
json.id 0
json.name "未分班"
json.work_count ungroup_work_count
json.last_review_time ungroup_last_review_time @homework
end
6 years ago
end
end