# 教师身份的立即发布、立即截止、代码查重入口的判断
json.publish_immediately identity < Course::STUDENT && homework.publish_immediately(user)
json.end_immediately identity < Course::STUDENT && homework.end_immediately(user)
json.code_review identity < Course::STUDENT && homework.code_review if homework.homework_type == 'practice'
json.view_answer homework.view_answer(identity, user.id) if homework.homework_type != "practice"