注释掉给未答题的学生0分的代码

This commit is contained in:
cxt 2015-12-15 20:33:29 +08:00
parent 481b7b96eb
commit 097d0653ba
1 changed files with 2 additions and 0 deletions

View File

@ -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