Merge branch 'dev_aliyun' into educoder

dev_aliyun
daiao 6 years ago
commit 579537709e

@ -3,7 +3,7 @@ class ManagementsController < ApplicationController
before_filter :require_business
before_filter :require_admin, :only => [:shixun_setting_list, :mirror_repository, :mirror_picture_shixuns, :editmd_template,
:editmd_template, :subject_level_system, :subject_setting_list,
:shixun_authorization, :ec_template, :codemirror_template, :update_user,
:shixun_authorization, :ec_template, :codemirror_template,
:course_guide_template, :shixun_quality_score, :tech_system, :update_notice, :setting_banner,
:training_2018, :create_standard]
layout 'base_management'

@ -628,7 +628,6 @@ module ApplicationHelper
return
end
=end
user_e = UserExtensions.where(:user_id => User.current.id).first
if !User.current.profile_completed?
redirect_to my_account_path
Rails.logger.info("check_authentication end")

@ -17,6 +17,7 @@
first_stage = @competition.competition_stages.first
first_section = first_stage.competition_stage_sections.first
first_entry = first_section.competition_entries.first
second_entry = first_section.competition_entries.second
is_start = Time.now > first_section.start_time
competition_url = User.current.logged? ? "#{first_entry.url}?eid=#{User.current.id}" : "#{first_entry.url}"
btn_url = is_start ? "#{competition_url}" : "javascript:void(0);"
@ -44,8 +45,8 @@
user_enrolled = false
invite_code = nil
if first_entry.url.present?
course_id = first_entry.url.split('/')[-5, 1]
if first_entry.url.present? && second_entry.url.present?
course_id = second_entry.url
course = Course.find_by_id(course_id)
if course.present? && @user && @user.logged?

Loading…
Cancel
Save