课程访问权限

dev_course
daiao 6 years ago
parent c19744e25f
commit db58702645

@ -10,7 +10,7 @@ json.courses do
json.tasks_count get_tasks_count course
json.visits course.visits
json.is_public course.is_public
json.is_accessible course.is_public? || course.tea_id == @user.id || @user.course_identity(course) < Course::NORMAL
json.is_accessible course.is_public? || @user.course_identity(course) < Course::NORMAL
json.is_end course.is_end
json.first_category_url module_url(course.course_modules.first, course)
end

Loading…
Cancel
Save