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/exercises/common_header.json.jbuilder

22 lines
973 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

json.course_is_end @course.is_end # true表示已结束false表示未结束
json.extract! @exercise, :id,:exercise_name,:exercise_description,:show_statistic,:time
json.exercise_status @ex_status
json.user_permission do
json.is_teacher_or @is_teacher_or
json.current_status @user_exercise_answer
json.exercise_publish_count @exercise_publish_count #是否存在已发布的分班
json.exercise_unpublish_count @exercise_unpublish_count #是否存在未发布的分班
json.user_commit_counts @user_commit_counts #当前已提交的用户如果说为null表示当前用户为学生。如果大于0表示有已提交的用户
json.left_banner_id @left_banner_id
json.left_banner_name @left_banner_name
end
exercise_url_status = ex_common_header(@is_teacher_or,@exercise)
json.common_tabs do
json.array! exercise_url_status do |p|
json.common_tab p[:common_tab].to_i
json.active_status p[:active_status]
end
end