diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb index 962508f26..0036f4838 100644 --- a/app/controllers/challenges_controller.rb +++ b/app/controllers/challenges_controller.rb @@ -116,7 +116,7 @@ class ChallengesController < ApplicationController end # 向jenkins端发送请求,构建pipeline片段,实时返回结果 jenkins_shixuns = Redmine::Configuration['jenkins_shixuns'] - params = {:challengeStage => "#{@challenge.position}", :challengeType => "#{@challenge.evaluation_way.to_i}", :challengeProgramName => "#{@challenge.path}", :trainingID => "#{@shixun.id}"} + params = {:challengeStage => "#{@challenge.position}", :challengeType => "#{@challenge.evaluation_way.to_i}", :challengeProgramName => "#{@challenge.exec_path}", :trainingID => "#{@shixun.id}"} uri = URI("#{jenkins_shixuns}/jenkins-exec/game/generatePipelineScriptForChallenge") res = uri_exec uri, {challengeInfo: params.to_json} if res['code'] == 0 diff --git a/app/views/games/_file_edit_form.html.erb b/app/views/games/_file_edit_form.html.erb index 86e257180..cbd3dab09 100644 --- a/app/views/games/_file_edit_form.html.erb +++ b/app/views/games/_file_edit_form.html.erb @@ -65,7 +65,7 @@ editor_CodeMirror.setSize("auto","auto"); editor_CodeMirror.refresh(); var h = $("#games_repository_contents").height() - $("#top_repository").height() - 10; - $(".CodeMirror-scroll").css("min-height", h); - $(".CodeMirror-scroll").css("max-height", h); + $("#file_entry_content").find(".CodeMirror-scroll").css("min-height", h); + $("#file_entry_content").find(".CodeMirror-scroll").css("max-height", h); }); \ No newline at end of file diff --git a/app/views/games/_game_show.html.erb b/app/views/games/_game_show.html.erb index 5f0f5dfe0..0eb1ec83f 100644 --- a/app/views/games/_game_show.html.erb +++ b/app/views/games/_game_show.html.erb @@ -46,7 +46,7 @@
-
+
<%= @game_challenge.answer %>
@@ -113,7 +113,8 @@ flowChart : true, // 默认不解析 sequenceDiagram : true // 默认不解析 }); - myCodeMirror.setSize('auto','auto');//设置版本库codemirror的高度 + myCodeMirror.setSize("auto", "auto");//设置版本库codemirror的高度 + $("#game_answer_show").find(".CodeMirror-scroll").css("margin-bottom", 0); $("#game_answer_show" ).children(".CodeMirror").css("line-height", 1.2); $("#game_answer_show").children().css("border", 0); // 设置图片最大宽度不能超出边框 diff --git a/app/views/games/show.html.erb b/app/views/games/show.html.erb index 64d3d695a..e5df62bbf 100644 --- a/app/views/games/show.html.erb +++ b/app/views/games/show.html.erb @@ -37,8 +37,8 @@ control = 0; } var h = $("#games_repository_contents").height() - $("#top_repository").height() - 10; - $(".CodeMirror-scroll").css("min-height", h); - $(".CodeMirror-scroll").css("max-height", h); + $("#file_entry_content").find(".CodeMirror-scroll").css("min-height", h); + $("#file_entry_content").find(".CodeMirror-scroll").css("max-height", h); } // 测评的扩大与缩小 function valuation_extend_and_zoom(){ diff --git a/app/views/shixuns/_monitor_tip.html.erb b/app/views/shixuns/_monitor_tip.html.erb index 11473f249..7a8c99547 100644 --- a/app/views/shixuns/_monitor_tip.html.erb +++ b/app/views/shixuns/_monitor_tip.html.erb @@ -4,7 +4,7 @@
-
+