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

24 lines
996 B

6 years ago
json.course_is_end @course.is_end # true表示已结束false表示未结束
5 years ago
json.extract! @exercise, :id,:exercise_name,:exercise_description,:show_statistic
json.time @user_left_time
6 years ago
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