修改状态更新

This commit is contained in:
huang 2015-11-20 19:35:32 +08:00
parent da55b00da7
commit c0dfc17b19
1 changed files with 2 additions and 1 deletions

View File

@ -443,7 +443,8 @@ class ExerciseController < ApplicationController
# REDO: 提示提交成功
else
# 更新提交状态
@exercise.exercise_users.first.update_attributes(:status => true)
cur_exercise_user = ExerciseUser.where("user_id =? and exercise_id=?", User.current, @exercise.id).first
cur_exercise_user.update_attributes(:status => 1)
# 答题过程中需要统计完成量
@uncomplete_question = get_uncomplete_question(@exercise, User.current)
# 获取改学生的考试得分