|
|
@ -1006,6 +1006,7 @@ class ExercisesController < ApplicationController
|
|
|
|
def start_answer
|
|
|
|
def start_answer
|
|
|
|
ActiveRecord::Base.transaction do
|
|
|
|
ActiveRecord::Base.transaction do
|
|
|
|
begin
|
|
|
|
begin
|
|
|
|
|
|
|
|
@exercise_user_current = @exercise.exercise_users.exercise_commit_users(@exercise_current_user_id)&.first
|
|
|
|
if @exercise_user_current.blank?
|
|
|
|
if @exercise_user_current.blank?
|
|
|
|
if @user_course_identity > Course::ASSISTANT_PROFESSOR #当为老师的时候,不创建exercise_user表,理论上老师是不能进入答题的
|
|
|
|
if @user_course_identity > Course::ASSISTANT_PROFESSOR #当为老师的时候,不创建exercise_user表,理论上老师是不能进入答题的
|
|
|
|
exercise_user_params = {
|
|
|
|
exercise_user_params = {
|
|
|
|