|
|
|
@ -1012,6 +1012,10 @@ class ExercisesController < ApplicationController
|
|
|
|
|
if user_myshixun.blank? || user_myshixun.first.status != Exercise::UNPUBLISHED #当前用户的实训是否做完
|
|
|
|
|
@shixun_undo += 1
|
|
|
|
|
end
|
|
|
|
|
elsif q.question_type == Exercise::PROGRAM #当为编程题时
|
|
|
|
|
if q.hack_user(current_user.id).blank?
|
|
|
|
|
@ques_undo += 1
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
ques_vote = q.exercise_answers.search_exercise_answer("user_id", current_user.id)
|
|
|
|
|
if ques_vote.blank?
|
|
|
|
|