diff --git a/app/controllers/exercise_controller.rb b/app/controllers/exercise_controller.rb index 9c073afa8..444446ef4 100644 --- a/app/controllers/exercise_controller.rb +++ b/app/controllers/exercise_controller.rb @@ -450,7 +450,7 @@ class ExerciseController < ApplicationController if params[:answer_text].nil? || params[:answer_text].blank? #用户提交空答案,视作不作答 @percent = get_percent(@exercise,User.current) - render :json => {:text => ea.answer_text,:percent => format("%.2f", @percent)} + render :json => {:text => "",:percent => format("%.2f", @percent)} else #添加答案 ea = ExerciseAnswer.new @@ -476,7 +476,7 @@ class ExerciseController < ApplicationController # 用户提交空答案,视为删除答案 if ea.delete @percent = get_percent(@exercise,User.current) - render :json => {:text => ea.answer_text,:percent => format("%.2f", @percent)} + render :json => {:text => "",:percent => format("%.2f", @percent)} else render :json => {:text => "failure"} end