访问问卷报500
This commit is contained in:
parent
86e9ec068f
commit
7263598851
|
@ -37,7 +37,17 @@ module PollHelper
|
|||
pv.vote_text
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
#判断用户是否已经提交了问卷
|
||||
def has_commit_poll?(poll_id,user_id)
|
||||
pu = PollUser.find_by_poll_id_and_user_id(poll_id,user_id)
|
||||
if pu.nil?
|
||||
false
|
||||
else
|
||||
true
|
||||
end
|
||||
end
|
||||
|
||||
#统计答题百分比,统计结果保留两位小数
|
||||
def statistics_result_percentage(e, t)
|
||||
e = e.to_f
|
||||
|
|
Loading…
Reference in New Issue