From a491d38ab877a2cd421d6d1953fd723bc9f26600 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Sat, 27 Jul 2019 12:36:36 +0800 Subject: [PATCH 1/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 2/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 3/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 4/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 5/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 6/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 7/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 = { From fe205cae5f269117ae2ccd7a8d1470f4fe2b8bf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 27 Jul 2019 13:07:02 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/poll/PollNew.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index c3447c425..651a8b131 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -2295,7 +2295,7 @@ class PollNew extends Component { readOnlys: "readOnly", cancellation: false, }) - + window.location.href = `/courses/${coursesId}/polls/${result.data.data.id}/edit`; }) } else {