注释掉给未答题的学生0分的代码
This commit is contained in:
parent
481b7b96eb
commit
097d0653ba
|
@ -356,6 +356,7 @@ class ExerciseController < ApplicationController
|
|||
end
|
||||
|
||||
def student_exercise_list
|
||||
=begin
|
||||
if @exercise.end_time <= Time.now
|
||||
@course.student.each do |student|
|
||||
if ExerciseUser.where("user_id = ? && exercise_id = ?",student.student_id,@exercise.id).empty?
|
||||
|
@ -367,6 +368,7 @@ class ExerciseController < ApplicationController
|
|||
exercise_user.update_attributes(:score => s_score)
|
||||
end
|
||||
end
|
||||
=end
|
||||
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
|
||||
@all_exercises = @course.exercises.where("exercise_status > 1").order("created_at desc")
|
||||
@exercise_count = @exercise.exercise_users.where('score is not NULL').count
|
||||
|
|
Loading…
Reference in New Issue