diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb
index 72d476c49..78d7dd120 100644
--- a/app/controllers/games_controller.rb
+++ b/app/controllers/games_controller.rb
@@ -339,7 +339,7 @@ class GamesController < ApplicationController
@game.update_attribute(:final_score, score)
end
respond_to do |format|
- format.js{redirect_to myshixun_game_path(@game, :myshixun_id => @myshixun, :choose => 1)}
+ format.js{redirect_to myshixun_game_path(@game, :myshixun_id => @myshixun, :choose => @right)}
end
end
diff --git a/app/views/challenges/_edit_evaluating.html.erb b/app/views/challenges/_edit_evaluating.html.erb
index 891458a70..16b58d8ea 100644
--- a/app/views/challenges/_edit_evaluating.html.erb
+++ b/app/views/challenges/_edit_evaluating.html.erb
@@ -49,8 +49,8 @@
<% end %>
- 输入:<%= match_specific_symbol test.input unless test.input.blank? %>
- 输出:<%= match_specific_symbol test.output unless test.output.blank? %>
+ 输入:<%= match_specific_symbol test.input unless test.input.blank? %>
+ 输出:<%= match_specific_symbol test.output unless test.output.blank? %>
<% end %>
<% else %>
diff --git a/app/views/games/_code_actions.html.erb b/app/views/games/_code_actions.html.erb
index 239fa8d8d..5dbeb1731 100644
--- a/app/views/games/_code_actions.html.erb
+++ b/app/views/games/_code_actions.html.erb
@@ -14,7 +14,7 @@
<% if @st == 0 %>
评测
- <% elsif @game.status != 2 %>
+ <% else %>
评测
<% end %>
diff --git a/app/views/games/_game_choose_results.html.erb b/app/views/games/_game_choose_results.html.erb
index 37132c683..c1ea40b5d 100644
--- a/app/views/games/_game_choose_results.html.erb
+++ b/app/views/games/_game_choose_results.html.erb
@@ -44,7 +44,7 @@
<% if choose.choose_outputs.blank? %>
尚未提交,暂不支持查看
<% else %>
- <% if choose.current_choose_outputs.try(:answer) == choose.standard_answer %>
+ <% if choose.current_choose_outputs.try(:answer) == choose.standard_answer || @game.status == 2 %>
正确选项:<%= choose.standard_answer %>
你的选项:<%= choose.current_choose_outputs.try(:answer).nil? ? "无" : choose.current_choose_outputs.try(:answer) %>
<% else %>
diff --git a/app/views/games/show.js.erb b/app/views/games/show.js.erb
index 2419d5fec..2edcea941 100644
--- a/app/views/games/show.js.erb
+++ b/app/views/games/show.js.erb
@@ -11,7 +11,7 @@
$("#all_task_show").hide();
fadein = 0;
// 选择题
- <% if params[:choose] == "1" %>
+ <% if params[:choose] == "true" %>
<% if @had_done == 0 %>
$("#code_estimate").html("下一关");
var htmlvalue = "<%= j (render :partial => 'games/pass_game_show', :locals => { :game=> @game, :myshixun => @myshixun, :had_done => 0}) %>";