dev_partners
Alec Zhou 6 years ago
commit c76c43eb29

@ -63,7 +63,7 @@ gem 'elasticsearch-rails'
gem 'oauth2'
# xlsx
gem 'axlsx_rails', '0.3.0'
# gem 'axlsx_rails', '0.3.0'
#Ruby 2.2+ has removed test/unit from the core library.
if RUBY_VERSION>='2.2'

@ -1416,7 +1416,8 @@ end
def update_depart_identifier
if params[:depart] && params[:identifier]
@department = Department.where(:id => params[:depart]).first
@department.update_attributes(:identifier => params[:identifier]) if @department.present?
identifier = params[:identifier].strip.blank? ? nil : params[:identifier].strip
@department.update_attributes(:identifier => identifier) if @department.present?
end
end

@ -64,7 +64,7 @@ class School < ActiveRecord::Base
def statistic_url
dep = departments.where("identifier is not null").first
url = dep.present? ? "/colleges/#{dep.identifier}/statistics" : "/colleges/#{self.id}/statistics"
url = dep.present? && !dep.identifier.blank? ? "/colleges/#{dep.identifier}/statistics" : "/colleges/#{self.id}/statistics"
end
def course_act_time

Loading…
Cancel
Save