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.
35 lines
1.1 KiB
35 lines
1.1 KiB
6 years ago
|
json.partial! "homework_public_navigation", locals: {homework: @homework, course: @course, user: @current_user}
|
||
|
json.last_review_time @last_review_time
|
||
|
json.publish_immediately @user_course_identity < Course::STUDENT && @homework.publish_immediately(@current_user)
|
||
|
json.end_immediately @user_course_identity < Course::STUDENT && @homework.end_immediately(@current_user)
|
||
|
|
||
|
# 分班情况
|
||
|
json.group_info do
|
||
|
json.array! @course_groups do |group|
|
||
|
json.id group.id
|
||
|
json.name group.name
|
||
|
json.members_count group.course_members.count
|
||
|
end
|
||
|
end
|
||
|
# 如果存在未分班的查重则显示未分班
|
||
|
if @non_course_group
|
||
|
json.on_course_group do
|
||
|
json.id 0
|
||
|
json.name "未分班"
|
||
|
json.members_count @non_course_group
|
||
|
end
|
||
|
end
|
||
|
|
||
|
# 抄袭作品数
|
||
|
json.copy_reviews_count @copy_reviews_count
|
||
|
# 所有作品数
|
||
|
json.all_reviews_count @all_reviews_count
|
||
|
|
||
|
json.users_reviews do
|
||
|
json.array! @users_reviews do |review|
|
||
|
json.user_id review.user.id
|
||
|
json.username review.user.full_name
|
||
|
json.student_id review.user.student_id
|
||
|
json.code_rate format("%.1f", review.code_rate)
|
||
|
end
|
||
|
end
|