|
|
|
@ -147,9 +147,17 @@ class PollVotesController < ApplicationController
|
|
|
|
|
else
|
|
|
|
|
question_max_choices = 0
|
|
|
|
|
end
|
|
|
|
|
if @poll_question.min_choices.present?
|
|
|
|
|
question_min_choices = @poll_question.min_choices
|
|
|
|
|
else
|
|
|
|
|
question_min_choices = 0
|
|
|
|
|
end
|
|
|
|
|
if question_max_choices > 0 && (user_vote_count > question_max_choices)
|
|
|
|
|
normal_status(-1,"多选题答案超过最大限制!")
|
|
|
|
|
end
|
|
|
|
|
if question_min_choices > 0 && (user_vote_count < question_min_choices)
|
|
|
|
|
normal_status(-1,"多选题答题不得少于最小限制!")
|
|
|
|
|
end
|
|
|
|
|
elsif (poll_user.present? && poll_user.commit_status == 1) || poll_user_status == 3
|
|
|
|
|
normal_status(-1,"已提交/已结束的问卷不允许修改!")
|
|
|
|
|
end
|
|
|
|
|