接口调整

dev_forum
cxt 5 years ago
parent 1bfc279905
commit e7cec7b8a3

@ -1188,7 +1188,7 @@ class ExercisesController < ApplicationController
elsif @user_course_identity > Course::ASSISTANT_PROFESSOR #当前为学生或者有过答题的(提交/未提交) elsif @user_course_identity > Course::ASSISTANT_PROFESSOR #当前为学生或者有过答题的(提交/未提交)
@ex_user_end_time = @exercise.get_exercise_end_time(current_user.id) #当前用户所看到的剩余时间 @ex_user_end_time = @exercise.get_exercise_end_time(current_user.id) #当前用户所看到的剩余时间
@exercise_all_users = @exercise.get_stu_exercise_users @exercise_all_users = @exercise.get_stu_exercise_users
get_exercise_answers(@exercise_users_list, @exercise_status) # 未答和已答的 get_exercise_answers(@exercise_all_users, @exercise_status) # 未答和已答的
exercise_current_user = @exercise_all_users.exercise_commit_users(current_user.id) #当前用户是否开始做试卷(提交/未提交/没做) exercise_current_user = @exercise_all_users.exercise_commit_users(current_user.id) #当前用户是否开始做试卷(提交/未提交/没做)
if exercise_current_user.present? if exercise_current_user.present?
@exercise_current_user_status = 1 #当前用户的状态,为学生 @exercise_current_user_status = 1 #当前用户的状态,为学生
@ -1202,7 +1202,7 @@ class ExercisesController < ApplicationController
end end
else else
@exercise_all_users = @exercise.get_stu_exercise_users @exercise_all_users = @exercise.get_stu_exercise_users
get_exercise_answers(@exercise_users_list, @exercise_status) # 未答和已答的 get_exercise_answers(@exercise_all_users, @exercise_status) # 未答和已答的
@exercise_current_user_status = 2 #当前用户非课堂成员 @exercise_current_user_status = 2 #当前用户非课堂成员
@exercise_users_list = [] @exercise_users_list = []
end end

Loading…
Cancel
Save