• Closed polls have no vote

    From Nightfox@VERT/DIGDIST to Digital Man on Fri Aug 18 15:53:00 2017
    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.

    Nightfox

    ---
    ž Synchronet ž Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Fri Aug 18 17:18:00 2017
    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.

    digital man

    Synchronet/BBS Terminology Definition #25:
    FTS = FidoNet Technical Standard
    Norco, CA WX: 70.7ųF, 71.0% humidity, 2 mph SE wind, 0.00 inches rain/24hrs

    ---
    ž Synchronet ž Vertrauen ž Home of Synchronet ž [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Nightfox on Fri Aug 18 17:26:00 2017
    Re: Closed polls have no vote information
    By: Digital Man to Nightfox on Fri Aug 18 2017 09:18 pm

    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.

    I just tested in a local test msgbase and closing poll did not remove its votes:

    ŚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄśśśś
    ³ Subj: can you see this?
    ³ Attr: Poll (Closed)
    ³ From: Digital Man #1
    ³ Date: Mon Aug 14 2017 02:59 am PDT (4.8 days ago) ĄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄśśśśśś

    1: yes [1 100%] ū
    2: no [1 100%] ū
    3: maybe [0 0%]

    Have you tried closing a poll using the built-in message reader functionality?

    digital man

    Synchronet/BBS Terminology Definition #8:
    BSO = Binkley Style Outbound
    Norco, CA WX: 70.2ųF, 73.0% humidity, 3 mph ESE wind, 0.00 inches rain/24hrs

    ---
    ž Synchronet ž Vertrauen ž Home of Synchronet ž [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Nightfox on Fri Aug 18 17:49:00 2017
    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.

    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.

    digital man

    Synchronet "Real Fact" #9:
    The name "DOVE-Net" comes from: The Beast's DOmain / VErtrauen network.
    Norco, CA WX: 69.8ųF, 73.0% humidity, 4 mph SE wind, 0.00 inches rain/24hrs

    ---
    ž Synchronet ž Vertrauen ž Home of Synchronet ž [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Sat Aug 19 05:38:00 2017
    Re: Closed polls have no vote information
    By: Digital Man to Nightfox on Fri Aug 18 2017 09:49 pm

    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.

    That seems to work as expected.

    I have updated SlyVote for multi-answer polls, and it seems to be working properly. I've tested to make sure SlyVote is saving poll responses properly (by viewing them in the stock reader) and that SlyVote is displaying polls with their responses properly (after voting with the stock reader). You should be able to use the latest SlyVote.js and DDLightbarMenu.js that I've committed to CVS.

    Nightfox

    ---
    ž Synchronet ž Digital Distortion: digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to Digital Man on Sat Aug 19 08:16:00 2017
    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..

    Nightfox

    ---
    ž Synchronet ž Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Sat Aug 19 15:02:00 2017
    Re: Closed polls have no vote information
    By: Nightfox to Digital Man on Sat Aug 19 2017 12:16 pm

    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..

    close_poll() ends up calling smb_addpollclosure() which insures that the from name/net_addr matches the pollster (author/sender of the poll). If you wanted to spoof that information (just copy those header fields from the poll msg) in JS, you could do that. The built-in method of closing polls does not make any special exemption for the sysop/sub-op and I don't personally think it's needed.

    digital man

    Synchronet/BBS Terminology Definition #41:
    SBBS = Synchronet Bulletin Board System
    Norco, CA WX: 75.9ųF, 62.0% humidity, 11 mph ESE wind, 0.00 inches rain/24hrs

    ---
    ž Synchronet ž Vertrauen ž Home of Synchronet ž [vert/cvs/bbs].synchro.net