A closed survey simply does not show the form anymore.

This patch applies the method that the Poll module uses to close surveys. There are two added settings - Active/Closed and runtime.

Even though this patch is against HEAD, I have only tested the code against a previous version that was patched to use the survey module with 4.7. Nothing related to the runtime was of use to me so was not tested. Only brought over since the Poll module has this too.

If there are existing surveys there will be a couple of mysql commands required:

ALTER TABLE survey ADD runtime int(10) NOT NULL default '0';
ALTER TABLE survey ADD active int(2) unsigned NOT NULL default '0';
update survey set active = '1';

Comments

joestewart’s picture

Title: Close Surveys in the same manner as Polls » Missed a chunk - closing paren.
StatusFileSize
new3.59 KB

replacement patch

mised a closing paren when changing patch for HEAD.

joestewart’s picture

Title: Missed a chunk - closing paren. » Close Surveys in the same manner as Polls

oops - didn't mean to change the title.

joestewart’s picture

StatusFileSize
new3.59 KB

_update portion had fields out of order. Maybe last patch today :) Tested this against HEAD.

quicksketch’s picture

Status: Needs review » Closed (fixed)

Survey module is no longer being maintained, use Webform module instead.

---Closing down issue queue of survey module---