| @@ -2,6 +2,7 @@ class SettingsController < ApplicationController | |||||
| def show | def show | ||||
| @old_projects_url = nil | @old_projects_url = nil | ||||
| get_navbar | get_navbar | ||||
| site_page_deploy_domain | |||||
| get_add_menu | get_add_menu | ||||
| get_common_menu | get_common_menu | ||||
| get_sub_competitions | get_sub_competitions | ||||
| @@ -34,6 +35,10 @@ class SettingsController < ApplicationController | |||||
| # end | # end | ||||
| end | end | ||||
| def site_page_deploy_domain | |||||
| @deploy_domain = EduSetting.find_by_name("site_page_deploy_domain").try(:value) | |||||
| end | |||||
| def get_add_menu | def get_add_menu | ||||
| @add = [] | @add = [] | ||||
| Site.add.select(:id, :name, :url, :key).to_a.map(&:serializable_hash).each do |site| | Site.add.select(:id, :name, :url, :key).to_a.map(&:serializable_hash).each do |site| | ||||
| @@ -24,7 +24,7 @@ class GlccMediumTermExamineMaterial < ActiveRecord::Base | |||||
| state = [] | state = [] | ||||
| # code_or_pr_url = "https://www.gitlink.org.cn/Gitlink/forgeplus/pulls/337" | # code_or_pr_url = "https://www.gitlink.org.cn/Gitlink/forgeplus/pulls/337" | ||||
| url_array = code_or_pr_url.split("/") | url_array = code_or_pr_url.split("/") | ||||
| gitlink_index = url_array.index("www.gitlink.org.cn") || url_array.index("gitlink.org.cn") | |||||
| gitlink_index = url_array.index("www.gitlink.org.cn") || url_array.index("gitlink.org.cn") || url_array.index("testforgeplus.trustie.net") | |||||
| pull_index = url_array.index("pulls") | pull_index = url_array.index("pulls") | ||||
| #发送没有在gitlink上提交PR的邮件 | #发送没有在gitlink上提交PR的邮件 | ||||
| @@ -43,7 +43,7 @@ class GlccMediumTermExamineMaterial < ActiveRecord::Base | |||||
| unless pr.present? | unless pr.present? | ||||
| state << 3 | state << 3 | ||||
| end | end | ||||
| if white_list && term == 1 #特殊处理 白名单的中期考核不处理 中期考核后去掉 | |||||
| if white_list #特殊处理 白名单考核不处理 | |||||
| state = [] | state = [] | ||||
| end | end | ||||
| state | state | ||||
| @@ -32,6 +32,7 @@ json.setting do | |||||
| json.nav_logo_url default_setting.nav_logo_url&.[](1..-1) | json.nav_logo_url default_setting.nav_logo_url&.[](1..-1) | ||||
| json.login_logo_url default_setting.login_logo_url&.[](1..-1) | json.login_logo_url default_setting.login_logo_url&.[](1..-1) | ||||
| json.tab_logo_url default_setting.tab_logo_url&.[](1..-1) | json.tab_logo_url default_setting.tab_logo_url&.[](1..-1) | ||||
| json.site_page_deploy_domain @deploy_domain | |||||
| json.subject_banner_url default_setting.subject_banner_url&.[](1..-1) | json.subject_banner_url default_setting.subject_banner_url&.[](1..-1) | ||||
| json.course_banner_url default_setting.course_banner_url&.[](1..-1) | json.course_banner_url default_setting.course_banner_url&.[](1..-1) | ||||