diff --git a/app/controllers/exercises_controller.rb b/app/controllers/exercises_controller.rb index e25bec7f2..191825cc3 100644 --- a/app/controllers/exercises_controller.rb +++ b/app/controllers/exercises_controller.rb @@ -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,"提交失败,当前用户不为课堂学生!") diff --git a/public/react/src/modules/courses/members/ChangeRolePop.js b/public/react/src/modules/courses/members/ChangeRolePop.js index 7f55910bf..0f9e6f5f1 100644 --- a/public/react/src/modules/courses/members/ChangeRolePop.js +++ b/public/react/src/modules/courses/members/ChangeRolePop.js @@ -44,9 +44,9 @@ function ChangeRolePop({ member_roles = [], record, courseId, onChangeRoleSucces showNotification('保存成功') onChangeRoleSuccess() + trigger('updatabanner') if (fetchUser && record.user_id == getUserId) { fetchUser() - trigger('updatabanner') } }