我的评分显示错误
This commit is contained in:
parent
e82c88df48
commit
194ab98361
|
@ -21,7 +21,7 @@ class StudentWorkController < ApplicationController
|
||||||
@stundet_works = search_homework_member @homework.student_works.select("*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("#{@order} #{@b_sort}"),@name
|
@stundet_works = search_homework_member @homework.student_works.select("*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("#{@order} #{@b_sort}"),@name
|
||||||
end
|
end
|
||||||
else #剩余情况: 学生 && 非匿评作业 如果未提交作品,只能看到自己的,提交了作品,能看到所有作品
|
else #剩余情况: 学生 && 非匿评作业 如果未提交作品,只能看到自己的,提交了作品,能看到所有作品
|
||||||
my_work = @homework.student_works.select("*,final_score - absence_penalty - late_penalty as score").where(:user_id => User.current.id)
|
my_work = @homework.student_works.select("*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id)
|
||||||
if my_work.empty?
|
if my_work.empty?
|
||||||
@stundet_works = []
|
@stundet_works = []
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue