Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

dev_new_shixunsrepository
杨树明 5 years ago
commit 887d4541a7

@ -214,7 +214,7 @@ class HomeworkCommonsController < ApplicationController
limit = params[:limit] || 20 limit = params[:limit] || 20
@student_works = @student_works.page(page).per(limit) @student_works = @student_works.page(page).per(limit)
if @homework.homework_type == "practice" if @homework.homework_type == "practice"
@student_works = @student_works.includes(:student_works_scores, user: :user_extension, myshixun: :games) @student_works = @student_works.includes(:student_works_scores, :shixun_work_comments, user: :user_extension, myshixun: :games)
else else
@student_works = @student_works.includes(:student_works_scores, :project, user: :user_extension) @student_works = @student_works.includes(:student_works_scores, :project, user: :user_extension)
end end

@ -108,6 +108,7 @@ if @homework.homework_type == "practice"
json.student_id work.user.try(:student_id) json.student_id work.user.try(:student_id)
json.group_name @students.select{|student| student.user_id == work.user_id}.first.try(:course_group_name) json.group_name @students.select{|student| student.user_id == work.user_id}.first.try(:course_group_name)
json.work_status work.compelete_status json.work_status work.compelete_status
json.has_comment work.shixun_work_comments.size > 0
end end
elsif @homework.homework_type == "group" || @homework.homework_type == "normal" elsif @homework.homework_type == "group" || @homework.homework_type == "normal"
json.anonymous_comment @homework.anonymous_comment json.anonymous_comment @homework.anonymous_comment

Loading…
Cancel
Save