[Elgg 1.8-1.12 & 2.X: Poll plugin] v1.9.4

Release Notes

  • Removal of mod/poll/everyone.php (I believe this file is no longer necessary as a user should be directed to it anymore - if I'm wrong and you get issues by the file missing please tell me),
  • Add remaining inline script element JS code to AMD module,
  • Total reset of votes when editing a poll (adding/removing choices or modifying existing choices). Problem was that users who already voted were unable to re-vote after poll choices had been changed. This could have been quite annoying for them if they wanted to change their vote based on the updated choices (a mischievous person would have even been able to switch the choices to contradict the poll results completely!). The only way to make it fair seemed to me to reset the votes to allow everyone a re-vote. Downside is that even correcting a typo in a poll choice text will reset the poll but his is unavoidable unfortunately,
  • Fixed bug where poll choices of a group poll got lost when poll was edited by the group admin but the poll is owned by another group member,
  • Fixed bug that prevented the description of a poll to be completely removed.
  • @Michele

    Polls with closing date are supposed to work as follows:

    • you set a closing date (e.g. April 30th),
    • voting should be possible until AND including April 30th,
    • on May 1st it would no longer be possible to vote and the text should say "Voting for this poll ended on 30. April 2016."

    There might be an issue with timezones I missed to take into account (though it looked alright in all my tests so far). Some questions:

    • What is the timezone on your server?
    • What is showing up in the subtext (line under poll title)? It should show "(Poll closing date: 30. April 2016)" in red.
    • What's the text below the title section (e.g. "Voting for this poll ended on 30. April 2016.")?
    • If you edit the poll (not making changes and not saving just load the edit page of the poll), what is shown in the "Poll closing date (optional)" input field?
  • I think I found the bug. The closing date is handled in GMT almost everywhere (i.e. there's no time offset considered between the date selected on the poll edit page and the exact time a poll is closed). For example, the output of "(Poll closing date: 30. April 2016)" below the poll title is also in GMT. But the date in the text "Voting for this poll ended on 29. April 2016." (as shown in case of your poll) is the ONLY occasion (hopefully!) where the date is displayed in local time. The correct date should show when modifying mod/poll/views/default/poll/poll_widget_content.php, i.e. changing the lines

    $date_day = date('j', $poll->close_date);
    $date_month = date('m', $poll->close_date);
    $date_year = date('Y', $poll->close_date);
    

    into

    $date_day = gmdate('j', $poll->close_date);
    $date_month = gmdate('m', $poll->close_date);
    $date_year = gmdate('Y', $poll->close_date);

Stats

  • Category: Communication
  • License: GNU General Public License (GPL) version 2
  • Updated: 2019-2-26
  • Downloads: 5345
  • Recommendations: 12

Other Projects

View iionly's plugins