Merge branch 'develop' of https://bdgit.trustie.net/hushasha/bigdata into develop

This commit is contained in:
XuCheng642 2017-09-22 20:26:43 +08:00
commit 6f17f97c4d
8 changed files with 46 additions and 5 deletions

View File

@ -15,7 +15,7 @@ unless RUBY_PLATFORM =~ /w32/
gem 'nokogiri'
end
gem 'simple_xlsx_reader'
#gem 'simple_xlsx_reader'
gem 'wechat',path: 'lib/wechat'
gem 'grack', path:'lib/grack'
gem 'gitlab', path: 'lib/gitlab-cli'

View File

@ -1466,6 +1466,15 @@ end
shixun.update_column('status', 2)
apply_action.update_attributes(:status => 1, :dealer_id => User.current.id)
shixun_modify_status_without_publish shixun, 1
# 实训发布后则不允许修改代码
g = Gitlab.client
shixun.shixun_members.each do |member|
gid = User.find(member.user_id).try(:gid)
g.edit_team_member(shixun.gpid, gid, 10) # 3代表角色master
end
# 加入超级管理员
admin_gid = User.where(:admin => 1).first.try(:gid)
g.add_team_member(shixun.gpid, admin_gid, 40) # 30代表角色master
end
@authorizations = ApplyAction.where(:container_type => "ApplyShixun", :status => 0)
@authorizations_count = @authorizations.count

View File

@ -44,7 +44,7 @@ class Challenge < ActiveRecord::Base
def choose_score
score = 0
self.challenge_chooses.each do |choose|
score += choose.score
score += choose.score.to_i
end
return score
end

View File

@ -1,4 +1,4 @@
<div class="new_roadmap_conbox mb10 mt15">
<div class="new_roadmap_conbox box_bg_shandow mb10 mt15">
<div class=" clear">
<ul class="reply-container-branch fl" >
<%= render :partial => 'shixun_navigation' %>

View File

@ -1,4 +1,4 @@
<div class="container-big mt20 mb20" style="width: 100%;">
<div class="container-big box_bg_shandow mt20 mb20" style="width: 100%;">
<div class="new_roadmap_conbox mb10" >
<div class="new_roadmap_info_top clear ">
<%=link_to "<span class='new_roadmap_icons_back mr5'></span>返回提交历史".html_safe,

View File

@ -0,0 +1,22 @@
class SyncPublishGameForGitlab < ActiveRecord::Migration
def up
begin
g = Gitlab.client
shixuns = Shixun.where(:status => 2)
shixuns.each do |shixun|
shixun.shixun_members.each do |member|
gid = User.find(member.user_id).try(:gid)
g.edit_team_member(shixun.gpid, gid, 10) # 3代表角色master
end
# 加入超级管理员
admin_gid = User.where(:admin => 1).first.try(:gid)
g.add_team_member(shixun.gpid, admin_gid, 40) # 30代表角色master
end
rescue Exception => e
puts e.message
end
end
def down
end
end

View File

@ -0,0 +1,10 @@
class AddScoreDefaultValueForChallenge < ActiveRecord::Migration
def up
challenges = Challenge.where(:score => nil)
challenges.update_all(:score => 100)
change_column :challenges, :score, :integer, :default => 100
end
def down
end
end

View File

@ -279,7 +279,7 @@ a:hover.edu-filter-cir-grey,a.edu-filter-cir-grey.active{ border:1px solid #3498
.edu-pop-table tr td{border-bottom:1px solid #eee;}
.edu-pop-table.table-line tr td,.edu-pop-table.table-line tr th{ border-right:1px solid #eee;}
.edu-pop-table.table-line tr td:last-child,.edu-pop-table.table-line tr th:last-child{border-right:none;}
.edu-pop-table tr td .alink-name{color: #666666!important;}
.edu-pop-table tr td .alink-name{color: #333!important;}
.edu-pop-table tr td .alink-name:hover{color: #FF7500!important;}
.edu-pop-table tr td .alink-operate{color: #cccccc!important;}
.edu-pop-table tr td .alink-operate:hover{color: #FF7500!important;}