Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

sso
杨树明 5 years ago
commit d256f67d87

@ -55,6 +55,12 @@ class CourseGroupsController < ApplicationController
end
end
# 邀请码停用/启用
def set_invite_code_halt
@group.update!(invite_code_halt: !@group.invite_code_halt)
normal_status(0, "成功")
end
private
def set_group

@ -152,7 +152,7 @@ module ShixunsHelper
challenge_program_name = []
shixun.challenges.map(&:exec_path).each do |exec_path|
challenge_program_name << "\"#{exec_path}\""
if shixun.main_mirror_name == "Java" || shixun.main_mirror_name == "Openjdk10/VNC"
if shixun.main_mirror_name == "Java" || shixun.main_mirror_name == "Openjdk10/VNC" || shixun.main_mirror_name == "JavaWeb"
if exec_path.nil? || exec_path.split("src/")[1].nil?
source = "\"\""
else

@ -662,6 +662,7 @@ Rails.application.routes.draw do
member do
post 'rename_group'
post 'move_category'
post 'set_invite_code_halt'
end
collection do

@ -0,0 +1,5 @@
class AddCodeHaltToCourseGroup < ActiveRecord::Migration[5.2]
def change
add_column :course_groups, :invite_code_halt, :boolean, default: false
end
end

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save