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