Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_local_2
caicai8 5 years ago
commit e1d4ba3db0

@ -80,6 +80,11 @@ class HomeworkCommon < ApplicationRecord
end
end
# 实训作业的主目录信息
def main_category_info
{category_id: course.shixun_course_modules.take.try(:id), category_name: course.shixun_course_modules.take.try(:module_name)}
end
# 根据是否统一发布获取作业的作品列表
def all_works
student_works = self.unified_setting ? self.student_works :

@ -2,6 +2,7 @@ json.course_id course.id
json.course_name course.name
json.is_end course.is_end
json.category homework.category_info
json.main_category homework.main_category_info if homework.homework_type == "practice"
member = course.course_members.find_by(user_id: user.id, is_active: 1)
curr_status = homework_curr_status(homework, user.course_identity(course), course, member, member&.teacher_course_groups)
json.homework_status curr_status[:status]

Loading…
Cancel
Save