|
|
@ -1,4 +1,4 @@
|
|
|
|
json.(@subject, :id, :name, :description, :learning_notes, :stages_count, :stage_shixuns_count, :shixuns_count)
|
|
|
|
json.(@subject, :id, :name, :description, :learning_notes, :stages_count, :stage_shixuns_count, :shixuns_count, :excellent)
|
|
|
|
|
|
|
|
|
|
|
|
json.challenge_choose_count @subject.subject_challenge_choose_count
|
|
|
|
json.challenge_choose_count @subject.subject_challenge_choose_count
|
|
|
|
json.challenges_count @subject.subject_challenge_count
|
|
|
|
json.challenges_count @subject.subject_challenge_count
|
|
|
@ -13,11 +13,13 @@ json.allow_visit @subject.status > 1 || @is_manager
|
|
|
|
json.allow_add_member @is_manager
|
|
|
|
json.allow_add_member @is_manager
|
|
|
|
|
|
|
|
|
|
|
|
if @subject.excellent
|
|
|
|
if @subject.excellent
|
|
|
|
@courses.each do |course|
|
|
|
|
json.courses @courses do |course|
|
|
|
|
json.start_date course.start_date.beginning_of_day
|
|
|
|
json.course_id course.id
|
|
|
|
json.end_date course.end_date.end_of_day
|
|
|
|
json.first_category_url module_url(course.none_hidden_course_modules.first, course)
|
|
|
|
|
|
|
|
json.start_date course.start_date
|
|
|
|
|
|
|
|
json.end_date course.end_date
|
|
|
|
json.student_count course.students.count
|
|
|
|
json.student_count course.students.count
|
|
|
|
json.course_identity @user.course_identity(course)
|
|
|
|
json.course_identity @user.course_identity(course)
|
|
|
|
json.course_status course
|
|
|
|
json.course_status subject_course_status course
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|