From 6d84c0333a3dc653da54a8e108f790adce1bd629 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 11 Oct 2019 16:48:17 +0800 Subject: [PATCH 1/2] updatabanner --- public/react/src/modules/courses/members/ChangeRolePop.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') } } From f35f9a8dbe3b6e4999885d3cd1d16ae120a209ee Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Fri, 11 Oct 2019 16:58:53 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=AF=95=E5=8D=B7?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=90=8E=E7=AB=AF=E6=97=B6=E9=97=B4=E5=92=8C?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E4=B8=8D=E4=B8=80=E8=87=B4=E7=9A=84=E5=A4=84?= =?UTF-8?q?=E7=90=86=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/exercises_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/exercises_controller.rb b/app/controllers/exercises_controller.rb index f9d9531f1..ac86467f1 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,"提交失败,当前用户不为课堂学生!")