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

This commit is contained in:
cxt 2017-10-13 19:31:33 +08:00
commit 8326189ba5
3 changed files with 15 additions and 2 deletions

View File

@ -91,7 +91,13 @@ class GamesController < ApplicationController
# git_repository_url @myshixun, "Myshixun"
# @st 0 实践任务 1 选择题任务
def show
# g = Gitlab.client
# g_name = g.project(@myshixun.gpid).try(:name)
# if g_name.include?("-")
# g.delete_project()
# end
# 展示全部实训
# git_myshixun_url_ip @myshixun, user_id
@is_subject = params[:is_subject]
if @game.status == 1
# 放置页面ajax数据还没获取就关闭

View File

@ -1,7 +1,10 @@
<span class="mt10 -flex c_grey ml15" id="time-consuming"></span>
<!--<span class="mt10 mr15" style="color: #2dad96;" id="game_wating_time"></span>-->
<% if @myshixun.shixun.try(:language) == "PHP/Web" %>
<a href="<%= web_display_myshixun_game_path(@game, :myshixun_id => @myshixun) %>" target="_blank" class="shixun-task-btn task-btn-orange mr15 mt8">查看网页效果</a>
<a href="<%= "http://106.75.96.108:" + (50000 + @game.myshixun_id).to_s + '/' + @game.challenge.path.strip %>" target="_blank" class="shixun-task-btn task-btn-orange mr15 mt8">
查看网页效果
</a>
<!-- <a href="<%#= "http://106.75.96.108:" + (50000+4111).to_s + '/' + "src/step1/Helloworld.php" %>" target="_blank" class="shixun-task-btn task-btn-orange mr15 mt8">查看网页效果</a>-->
<% end %>
<% if @st == 0 %>
<div id="reset_code_to_bengin" class="<%= @game.status == 2 ? "" : "undis" %>">

View File

@ -19,6 +19,10 @@ class Gitlab::Client
end
end
def current_user_project(user_id, project_name)
get("/projects/current_user_projects?user_id=#{user_id}&project_name=#{project_name}")
end
# Gets information about a project.
#
# @example