|
|
|
@ -1497,8 +1497,12 @@ class HomeworkCommonsController < ApplicationController
|
|
|
|
|
@user = @student_work.user
|
|
|
|
|
tip_exception("当前用户无作品可以显示") if @student_work.nil?
|
|
|
|
|
# 查询最新一次的查重标识query_id
|
|
|
|
|
group_id = @course.course_members.where(user_id: params[:user_id]).pluck(:course_group_id).first
|
|
|
|
|
query_id = @homework.homework_group_reviews.where(:course_group_id => group_id).last.try(:query_id)
|
|
|
|
|
group_id = @course.students.where(user_id: params[:user_id]).pluck(:course_group_id).first
|
|
|
|
|
homework_group_review = @homework.homework_group_reviews.where(:course_group_id => group_id).last || @homework.homework_group_reviews.last
|
|
|
|
|
query_id = homework_group_review.try(:query_id)
|
|
|
|
|
Rails.logger.info("##################------query_id: #{query_id}")
|
|
|
|
|
tip_exception(-1, "query_id有误") unless query_id.present?
|
|
|
|
|
|
|
|
|
|
results = ReviewService.query_result({user_id: params[:user_id], query_id: query_id})
|
|
|
|
|
@shixun = @homework.shixuns.take
|
|
|
|
|
if results.status == 0
|
|
|
|
|