|
|
|
@ -24,9 +24,9 @@ json.homeworks @homework_commons.each do |homework|
|
|
|
|
|
# 只有在主目录才显示
|
|
|
|
|
json.upper_category_name homework.course_second_category&.name unless params[:category]
|
|
|
|
|
|
|
|
|
|
# charge_ids = @course.charge_group_ids(@member)
|
|
|
|
|
# json.publish_immediately @user_course_identity < Course::STUDENT && homework.publish_immediately(charge_ids)
|
|
|
|
|
# json.end_immediately @user_course_identity < Course::STUDENT && homework.end_immediately(charge_ids)
|
|
|
|
|
charge_ids = @course.charge_group_ids(@member)
|
|
|
|
|
json.publish_immediately @user.logged? && @user_course_identity < Course::STUDENT && homework.publish_immediately(charge_ids)
|
|
|
|
|
json.end_immediately @user.logged? && @user_course_identity < Course::STUDENT && homework.end_immediately(charge_ids)
|
|
|
|
|
|
|
|
|
|
unless curr_status[:status].include?("未发布")
|
|
|
|
|
work_count = calculate_work_count homework, @member
|
|
|
|
|