Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

competitions
杨树明 5 years ago
commit 6891e2a6a3

@ -1103,6 +1103,7 @@ class ExercisesController < ApplicationController
ActiveRecord::Base.transaction do
begin
can_commit_exercise = false
user_left_time = nil
if @user_course_identity > Course::ASSISTANT_PROFESSOR #为学生时
if params[:commit_method].to_i == 2 #自动提交时
user_left_time = get_exercise_left_time(@exercise,current_user)
@ -1131,7 +1132,7 @@ class ExercisesController < ApplicationController
CommitExercsieNotifyJobJob.perform_later(@exercise.id, current_user.id)
normal_status(0,"试卷提交成功!")
else
normal_status(-1,"提交失败,未到截止时间!")
normal_status(-2,"#{user_left_time.to_i}")
end
else
normal_status(-1,"提交失败,当前用户不为课堂学生!")

@ -44,9 +44,9 @@ function ChangeRolePop({ member_roles = [], record, courseId, onChangeRoleSucces
showNotification('保存成功')
onChangeRoleSuccess()
trigger('updatabanner')
if (fetchUser && record.user_id == getUserId) {
fetchUser()
trigger('updatabanner')
}
}

Loading…
Cancel
Save