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/homework_commons/_student_btn_check.json.jbu...

12 lines
506 B

if identity == Course::STUDENT
if homework.homework_type == "practice"
shixun = homework.shixuns.take
myshixun = work.try(:myshixun) ? work.myshixun : shixun.myshixuns.find_by(user_id: work.user_id)
json.task_operation task_operation_url(myshixun, shixun)
json.view_report work.work_status > 0
json.commit_des commit_des_status(work, homework)
else
json.work_statuses student_work_status(homework, work.user_id, homework.course, work)
end
json.work_id work.id
end