Hi DM,
It seems that after closing a poll, the poll no longer has any vote information. total_votes is 0, and the tally values for the options are all 0. Is that how it was designed? I'm curious because SlyVote has an option to display stats on the polls in the current sub-board (number of votes and highest-voted options), and for closed polls, those are all 0. Also, when viewing a closed poll, it appears as if it didn't get any votes.
Re: Closed polls have no vote information
By: Nightfox to Digital Man on Fri Aug 18 2017 07:53 pm
Hi DM,
It seems that after closing a poll, the poll no longer has any vote information. total_votes is 0, and the tally values for the options are all 0. Is that how it was designed? I'm curious because SlyVote has an option to display stats on the polls in the current sub-board (number of votes and highest-voted options), and for closed polls, those are all 0. Also, when viewing a closed poll, it appears as if it didn't get any votes.
No, that's not how it's supposed to work. A closed poll just means that no one else can vote (the polls have closed). I'll play with it and test it out some more. Maybe it's just a problem with the JS modeling as I'm pretty sure I tried it out using the built-in message reading functionality, but I'll give it a go again.
Hi DM,
It seems that after closing a poll, the poll no longer has any vote information. total_votes is 0, and the tally values for the options are all 0. Is that how it was designed? I'm curious because SlyVote has an option to display stats on the polls in the current sub-board (number of votes and highest-voted options), and for closed polls, those are all 0. Also, when viewing a closed poll, it appears as if it didn't get any votes.
I think the problem was that there was no easy method for your to properly close a poll via JS. You don't close a poll by modifying the poll (this would not send a closure message out to the network,f or example) - instead, a poll closure is actually a new message which propagates through the network and marks the (existing) poll as closed.
I just committed a change which adds a MsgBase.close_poll() method. Try using that to close a poll and it should work as intended.
I just committed a change which adds a MsgBase.close_poll() method. Try using that to close a poll and it should work as intended.
Re: Closed polls have no vote information
By: Digital Man to Nightfox on Fri Aug 18 2017 09:49 pm
I just committed a change which adds a MsgBase.close_poll() method. Try using that to close a poll and it should work as intended.
One thing I was thinking about is that in addition to the user who posted the poll, the sysop might also want to be able to close polls that were posted on their own BBS. Closing other peoples' polls on a networked sub-board would probably not be good though.. What do you think? Does close_poll() already have some logic for that? I imagine the logic for that could also probably be implemented in JavaScript..
Sysop: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,042 |
Nodes: | 16 (0 / 16) |
Uptime: | 09:24:22 |
Calls: | 500,918 |
Calls today: | 5 |
Files: | 109,372 |
D/L today: |
11,204 files (1,899M bytes) |
Messages: | 305,019 |
Posted today: | 3 |