发布试卷
This commit is contained in:
parent
98297da226
commit
c07e2fe2d2
|
@ -40,6 +40,7 @@ class ExerciseController < ApplicationController
|
||||||
else
|
else
|
||||||
if !@is_teacher && !has_click_exercise?(@exercise.id, User.current.id)
|
if !@is_teacher && !has_click_exercise?(@exercise.id, User.current.id)
|
||||||
eu = ExerciseUser.create(:user_id => User.current.id, :exercise_id => @exercise.id, :start_at => Time.now, :status => false)
|
eu = ExerciseUser.create(:user_id => User.current.id, :exercise_id => @exercise.id, :start_at => Time.now, :status => false)
|
||||||
|
@exercise_user = ExerciseUser.where("user_id=? and exercise_id=?", User.current.id, @exercise.id).first
|
||||||
end
|
end
|
||||||
|
|
||||||
# @percent = get_percent(@exercise,User.current)
|
# @percent = get_percent(@exercise,User.current)
|
||||||
|
|
Loading…
Reference in New Issue