From f8bf392149fbd086dcc0fd0ef004fcc4497ff409 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 27 Jul 2019 12:33:41 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E7=99=BE=E5=88=86=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/poll/pollStyle.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/poll/pollStyle.css b/public/react/src/modules/courses/poll/pollStyle.css index 360315e03..a486101cd 100644 --- a/public/react/src/modules/courses/poll/pollStyle.css +++ b/public/react/src/modules/courses/poll/pollStyle.css @@ -113,7 +113,7 @@ text-align: left; } .percentForm{ - width: 340px; + width: 330px; height: 11px; background: #F5F5F5; border-radius: 6px; From a491d38ab877a2cd421d6d1953fd723bc9f26600 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Sat, 27 Jul 2019 12:36:36 +0800 Subject: [PATCH 2/8] fixbug --- app/controllers/polls_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb index 5aecaadb0..4b2b7dc61 100644 --- a/app/controllers/polls_controller.rb +++ b/app/controllers/polls_controller.rb @@ -911,7 +911,7 @@ class PollsController < ApplicationController end error_question = error_question.reject(&:blank?) if error_question.reject(&:blank?).length > 0 - normal_status(-1, "#{error_question.join("\n")}") + normal_status(-1, "#{error_question.map{|a| "

"+a+"

"}.join("")}") else poll_user_current = @poll.poll_users.find_by_group_ids(current_user.id).first poll_user_params = { From 4899c05c8319efa1526e88f6edade0236e88d859 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Sat, 27 Jul 2019 12:39:00 +0800 Subject: [PATCH 3/8] fixubg --- app/controllers/polls_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb index 4b2b7dc61..c4d83bd8c 100644 --- a/app/controllers/polls_controller.rb +++ b/app/controllers/polls_controller.rb @@ -911,7 +911,7 @@ class PollsController < ApplicationController end error_question = error_question.reject(&:blank?) if error_question.reject(&:blank?).length > 0 - normal_status(-1, "#{error_question.map{|a| "

"+a+"

"}.join("")}") + normal_status(-1, "#{error_question.map{|a| "

"+a+"

"}.join("")}".html_safe) else poll_user_current = @poll.poll_users.find_by_group_ids(current_user.id).first poll_user_params = { From 2c8007b2d4f035cbb9fc6fee56c334554eef0e60 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Sat, 27 Jul 2019 12:49:43 +0800 Subject: [PATCH 4/8] fixbug --- app/controllers/polls_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb index c4d83bd8c..79b7fbd16 100644 --- a/app/controllers/polls_controller.rb +++ b/app/controllers/polls_controller.rb @@ -911,7 +911,7 @@ class PollsController < ApplicationController end error_question = error_question.reject(&:blank?) if error_question.reject(&:blank?).length > 0 - normal_status(-1, "#{error_question.map{|a| "

"+a+"

"}.join("")}".html_safe) + normal_status(-1, word_wrap("#{error_question.join("\n")}")) else poll_user_current = @poll.poll_users.find_by_group_ids(current_user.id).first poll_user_params = { From 533f5aee9e8859266ef9d503cc6ab5ea95a9974f Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Sat, 27 Jul 2019 12:52:00 +0800 Subject: [PATCH 5/8] fixubg --- app/controllers/polls_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb index 79b7fbd16..fcdf4f4d7 100644 --- a/app/controllers/polls_controller.rb +++ b/app/controllers/polls_controller.rb @@ -911,7 +911,7 @@ class PollsController < ApplicationController end error_question = error_question.reject(&:blank?) if error_question.reject(&:blank?).length > 0 - normal_status(-1, word_wrap("#{error_question.join("\n")}")) + normal_status(-1, "#{error_question.join("\n").gsub(/\n/, '
')}") else poll_user_current = @poll.poll_users.find_by_group_ids(current_user.id).first poll_user_params = { From 3b4e1e1516c520f0bc72cd3f88a9d01aaf5e6c8c Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Sat, 27 Jul 2019 12:57:35 +0800 Subject: [PATCH 6/8] fixbug --- app/controllers/polls_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb index fcdf4f4d7..b90b3c230 100644 --- a/app/controllers/polls_controller.rb +++ b/app/controllers/polls_controller.rb @@ -21,6 +21,7 @@ class PollsController < ApplicationController # before_action :get_all_polls_commit, only: [:commit_result] #该问卷全部的用户 before_action :get_left_banner_id, only:[:common_header,:start_answer,:new,:edit,:index] include PollsHelper + include ActionView::Helpers::TextHelper def index ActiveRecord::Base.transaction do @@ -911,7 +912,7 @@ class PollsController < ApplicationController end error_question = error_question.reject(&:blank?) if error_question.reject(&:blank?).length > 0 - normal_status(-1, "#{error_question.join("\n").gsub(/\n/, '
')}") + normal_status(-1, simple_format("#{error_question.join("\n")}")) else poll_user_current = @poll.poll_users.find_by_group_ids(current_user.id).first poll_user_params = { From 31db4954a6caefef3e538a1f81375ee794d41f25 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Sat, 27 Jul 2019 13:01:19 +0800 Subject: [PATCH 7/8] fixubg --- app/controllers/polls_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb index b90b3c230..5ff83c31b 100644 --- a/app/controllers/polls_controller.rb +++ b/app/controllers/polls_controller.rb @@ -912,7 +912,7 @@ class PollsController < ApplicationController end error_question = error_question.reject(&:blank?) if error_question.reject(&:blank?).length > 0 - normal_status(-1, simple_format("#{error_question.join("\n")}")) + normal_status(-1, simple_format("#{error_question.join("\n")}").html_safe) else poll_user_current = @poll.poll_users.find_by_group_ids(current_user.id).first poll_user_params = { From 99d159005a92fd6445c713354023016c4c494606 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Sat, 27 Jul 2019 13:04:03 +0800 Subject: [PATCH 8/8] fixubg --- app/controllers/polls_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb index 5ff83c31b..4348b3bfc 100644 --- a/app/controllers/polls_controller.rb +++ b/app/controllers/polls_controller.rb @@ -21,7 +21,6 @@ class PollsController < ApplicationController # before_action :get_all_polls_commit, only: [:commit_result] #该问卷全部的用户 before_action :get_left_banner_id, only:[:common_header,:start_answer,:new,:edit,:index] include PollsHelper - include ActionView::Helpers::TextHelper def index ActiveRecord::Base.transaction do @@ -912,7 +911,7 @@ class PollsController < ApplicationController end error_question = error_question.reject(&:blank?) if error_question.reject(&:blank?).length > 0 - normal_status(-1, simple_format("#{error_question.join("\n")}").html_safe) + normal_status(-1, "#{error_question.join(";")}") else poll_user_current = @poll.poll_users.find_by_group_ids(current_user.id).first poll_user_params = {