From 389d3cef55395213cfbfe52f86f7b6894ffc2e39 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 13 Aug 2019 14:49:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_commons_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb index c8cf36824..05f3bc41f 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -1336,6 +1336,7 @@ class HomeworkCommonsController < ApplicationController shixun = @homework.shixuns.take # 通过代码文件来判断语言 language = shixun.challenges.practice_type.pluck(:path).first + logger.info("#########language: #{language}") language = language.split(";")[0].split(".")[1].downcase if language.present? user_lists = [] if language.present? && (language == "java" || language == "py") From 981739495c3b362459407ab36344941becb7c811 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 13 Aug 2019 14:56:22 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9F=A5=E9=87=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_commons_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb index 05f3bc41f..ff1ee4e96 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -1336,8 +1336,7 @@ class HomeworkCommonsController < ApplicationController shixun = @homework.shixuns.take # 通过代码文件来判断语言 language = shixun.challenges.practice_type.pluck(:path).first - logger.info("#########language: #{language}") - language = language.split(";")[0].split(".")[1].downcase if language.present? + language = language.split(";")[0].split(".").last.downcase if language.present? user_lists = [] if language.present? && (language == "java" || language == "py") user_ids = @course.course_members.where(course_group_id: params[:group_ids]).distinct(:user_id).pluck(:user_id)