From 04cc78b2ab74f00ce38a7edc780decddf749577e Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 2 Jan 2020 14:31:58 +0800 Subject: [PATCH 1/2] 1 --- app/controllers/hack_user_lastest_codes_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/hack_user_lastest_codes_controller.rb b/app/controllers/hack_user_lastest_codes_controller.rb index 38238fea7..353833ee2 100644 --- a/app/controllers/hack_user_lastest_codes_controller.rb +++ b/app/controllers/hack_user_lastest_codes_controller.rb @@ -5,6 +5,7 @@ class HackUserLastestCodesController < ApplicationController before_action :update_user_hack_status, only: [:code_debug, :code_submit] before_action :require_auth_identity, only: [:add_notes] before_action :require_manager_identity, only: [:show, :update_code, :restore_initial_code, :sync_code] + skip_before_action :check_sign, only: [:listen_result] def show @my_hack.update_attribute(:submit_status, 0) if @my_hack.submit_status == 1 From 476590efdd0514ca45317e7163e33cf3e7895818 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 2 Jan 2020 14:40:33 +0800 Subject: [PATCH 2/2] 1 --- app/controllers/graduation_topics_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/graduation_topics_controller.rb b/app/controllers/graduation_topics_controller.rb index 203f18b35..5160136e8 100644 --- a/app/controllers/graduation_topics_controller.rb +++ b/app/controllers/graduation_topics_controller.rb @@ -175,10 +175,10 @@ class GraduationTopicsController < ApplicationController teacher_group = TeacherCourseGroup.find_or_create_by!(:course_id => @course.id, :course_member_id => member.try(:id), :user_id => @graduation_topic.tea_id, :course_group_id => course_group.try(:id)) + student_member = @course.course_members.where(:user_id => student_graduation_topic.user_id).first + student_member.update_attributes(:course_group_id => teacher_group.course_group_id) if student_member.present? end end - student_member = @course.course_members.where(:user_id => student_graduation_topic.user_id).first - student_member.update_attributes(:course_group_id => teacher_group.course_group_id) if student_member.present? student_graduation_topic.tidings.update_all(:status => 1) Tiding.create(:user_id => student_graduation_topic.user_id, :trigger_user_id => current_user.id,