代码文件判断

dev_hjm
daiao 6 years ago
parent 0034b26b00
commit 389d3cef55

@ -1336,6 +1336,7 @@ class HomeworkCommonsController < ApplicationController
shixun = @homework.shixuns.take shixun = @homework.shixuns.take
# 通过代码文件来判断语言 # 通过代码文件来判断语言
language = shixun.challenges.practice_type.pluck(:path).first 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(".")[1].downcase if language.present?
user_lists = [] user_lists = []
if language.present? && (language == "java" || language == "py") if language.present? && (language == "java" || language == "py")

Loading…
Cancel
Save