check commit_method

dev_hjm_a
SylorHuang 5 years ago
parent 0629bc15af
commit 938b974d77

@ -1078,6 +1078,7 @@ class ExercisesController < ApplicationController
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
begin begin
can_commit_exercise = false can_commit_exercise = false
Rails.logger.info("######____________params[:commit_method]_________################{params[:commit_method]}")
if (@user_course_identity > Course::ASSISTANT_PROFESSOR) && params[:commit_method].present? #为学生时 if (@user_course_identity > Course::ASSISTANT_PROFESSOR) && params[:commit_method].present? #为学生时
if params[:commit_method].to_i == 2 #自动提交时 if params[:commit_method].to_i == 2 #自动提交时
user_left_time = get_exercise_left_time(@exercise,current_user) user_left_time = get_exercise_left_time(@exercise,current_user)

Loading…
Cancel
Save