json.main_category main_catrgory do |category|
  json.main_category_id 0
  json.main_category_name category.module_name
  homework_count = practice_homework_count category.course
  json.publish_count homework_count[:publish_count]
  json.unpublish_count homework_count[:unpublish_count]
  json.all_count homework_count[:all_count]
end
json.homework_category homework_category do |category|
  json.category_id category.id
  json.category_name category.name
  json.publish_count category.homework_publish_count
  json.unpublish_count category.homework_unpublish_count
  json.all_count category.homework_commons.size
end