实训作业得分bug
This commit is contained in:
parent
3f027ea05c
commit
7ff96b64ad
|
|
@ -335,11 +335,11 @@ class HomeworkCommonController < ApplicationController
|
|||
if @homework.homework_type == 4
|
||||
if @homework_detail_manual.answer_open_evaluation != params[:answer_open_evaluation].to_i
|
||||
@homework_detail_manual.answer_open_evaluation = params[:answer_open_evaluation].to_i
|
||||
# if @homework.end_time < Time.now
|
||||
# @homework.student_works.each do |student_work|
|
||||
# set_shixun_final_score @homework, student_work, @homework_detail_manual.answer_open_evaluation
|
||||
# end
|
||||
# end
|
||||
if @homework.end_time < Time.now
|
||||
@homework.student_works.each do |student_work|
|
||||
set_shixun_final_score @homework, student_work, @homework_detail_manual.answer_open_evaluation
|
||||
end
|
||||
end
|
||||
end
|
||||
@homework.score_open = params[:homework_score_open] ? 1 : 0
|
||||
else
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace :homework_publishtime do
|
|||
if myshixun.nil?
|
||||
0
|
||||
else
|
||||
myshixun.games.select{|game| game.status == 2 && game.answer_open == 0}.count
|
||||
myshixun.games.select{|game| game.status == 2 && !game.answer_open}.count
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue