代码查重结果 不显示未提交的作品

This commit is contained in:
yuanke 2016-07-14 10:06:37 +08:00
parent 4bce77627d
commit 1e8f496718
2 changed files with 3 additions and 3 deletions

View File

@ -968,7 +968,7 @@ class CoursesController < ApplicationController
@homework = HomeworkCommon.find params[:homework]
#order("#{@order} #{@b_sort}"
@student_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,IF(final_score = 0, 0, final_score - absence_penalty - late_penalty)) as score").order("simi_value desc"),@name
@student_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,IF(final_score = 0, 0, final_score - absence_penalty - late_penalty)) as score").order("simi_value desc").has_committed,@name
@works_hash = {}

View File

@ -271,7 +271,7 @@ class StudentWorkController < ApplicationController
all_studentwork = find_all_student_work_by_homeid()
@work_count = all_studentwork.count
@work_count = all_studentwork.has_committed.count
end
#代码查重 status: 0完成 -2不需要查重 -1查重失败不支持该语言
@ -282,7 +282,7 @@ class StudentWorkController < ApplicationController
@homework = HomeworkCommon.find params[:homework]
all_studentwork = find_all_student_work_by_homeid()
all_studentwork = find_all_student_work_by_homeid().has_committed
if all_studentwork == nil
resultObj[:status] = -2