Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_hjm_a
cxt 5 years ago
commit 32321f7313

@ -978,7 +978,8 @@ class ExercisesController < ApplicationController
:status => nil,
:commit_status => 0,
:objective_score => 0.0,
:subjective_score => -1.0
:subjective_score => -1.0,
:commit_method => 0
}
redo_exercise_users = @exercise_users.exercise_commit_users(user_ids)
redo_exercise_users.update_all(redo_option)
@ -1102,10 +1103,10 @@ class ExercisesController < ApplicationController
ActiveRecord::Base.transaction do
begin
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 #为学生时
if params[:commit_method].to_i == 2 #自动提交时
user_left_time = get_exercise_left_time(@exercise,current_user)
Rails.logger.info("######__________auto_commit_user_left_time_________################{user_left_time}")
if user_left_time.to_i <= 0
can_commit_exercise = true
end
@ -1130,10 +1131,10 @@ class ExercisesController < ApplicationController
CommitExercsieNotifyJobJob.perform_later(@exercise.id, current_user.id)
normal_status(0,"试卷提交成功!")
else
normal_status(-1,"提交失败,请重试!")
normal_status(-1,"提交失败,未到截止时间!")
end
else
normal_status(-1,"提交失败,请重试!")
normal_status(-1,"提交失败,当前用户不为课堂学生!")
end
rescue Exception => e
uid_logger_error(e.message)

Loading…
Cancel
Save