From 6ee134b2f3794dfb36ac4db2049be6fd738a4ecd Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Fri, 1 Sep 2017 13:50:22 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E6=8A=80=E8=83=BD?=
=?UTF-8?q?=E6=A0=87=E7=AD=BE=E5=A4=B1=E5=8E=BB=E7=84=A6=E7=82=B9=E4=BF=9D?=
=?UTF-8?q?=E5=AD=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/challenges_controller.rb | 3 +--
app/views/challenges/edit.html.erb | 20 ++++++++++++++++----
app/views/layouts/base_shixun.html.erb | 2 ++
3 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb
index 7784f68a7..3b660b434 100644
--- a/app/controllers/challenges_controller.rb
+++ b/app/controllers/challenges_controller.rb
@@ -151,8 +151,7 @@ class ChallengesController < ApplicationController
end
end
end
-
- redirect_to edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => params[:tab])
+ redirect_to edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => params[:tab]), notice: 'Succeed'
rescue Exception => e
flash[:error] = "#{e.message}"
redirect_to edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => params[:tab])
diff --git a/app/views/challenges/edit.html.erb b/app/views/challenges/edit.html.erb
index b8b155b07..412ff24f0 100644
--- a/app/views/challenges/edit.html.erb
+++ b/app/views/challenges/edit.html.erb
@@ -39,7 +39,7 @@
上一阶段
<% end %>
<% if @shixun.status == 0 && User.current.manager_of_shixun?(@shixun) %>
-
+
+实践任务
+多选任务
+单选任务
@@ -58,7 +58,7 @@
">
参考答案
-
">
@@ -79,11 +79,23 @@
<%= render :partial => "edit_scoring" %>
<% elsif @tab == 5 %>
<%= render :partial => "edit_skill" %>
- <%# elsif @tab == 6 %>
+ <%# elsif @tab == 6 %>
<%#= render :partial => "edit_propaedeutics" %>
<% end %>
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/app/views/layouts/base_shixun.html.erb b/app/views/layouts/base_shixun.html.erb
index 170293b43..bb4d8f7a8 100644
--- a/app/views/layouts/base_shixun.html.erb
+++ b/app/views/layouts/base_shixun.html.erb
@@ -45,7 +45,9 @@
<%#= render_flash_messages %>
+ <% if !(params[:tab].to_i == 5 && params[:action] == "edit") %>
<%= render_flash_messages %>
+ <% end %>
<%= yield %>
<%= call_hook :view_layouts_base_content %>
From bf0b205f617b9c6891b0c52f732c51db01d74824 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Fri, 1 Sep 2017 14:21:07 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E8=AF=84=E6=B5=8B=E6=97=B6=EF=BC=8C?=
=?UTF-8?q?=E5=B7=A6=E4=BE=A7=E5=85=A8=E9=83=A8=E4=BB=BB=E5=8A=A1=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA=E6=A0=B7=E5=BC=8F=E6=9C=89=E7=BC=BA=E9=99=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/games/refresh_game_list.js.erb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/app/views/games/refresh_game_list.js.erb b/app/views/games/refresh_game_list.js.erb
index 19aa1a382..a7a15076b 100644
--- a/app/views/games/refresh_game_list.js.erb
+++ b/app/views/games/refresh_game_list.js.erb
@@ -1,3 +1,5 @@
-$("#all_task_tab").trigger("click"); // 模拟全部任务点击事件
+if($("#all_task_index").css("left") == "0px"){
+ $("#all_task_tab").trigger("click"); // 模拟全部任务点击事件
+}
$("#all_task_show").html("<%= j (render :partial => "games_list") %>");
hideModal();
\ No newline at end of file