发布试卷

This commit is contained in:
cxt 2015-11-20 18:38:50 +08:00
parent 98297da226
commit c07e2fe2d2
1 changed files with 1 additions and 0 deletions

View File

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