generated from your-land/yl_template
Change allow_changes to true, else a new survey could not be added questions
This commit is contained in:
parent
b0aaebf437
commit
f2ec7825ce
@ -70,7 +70,8 @@ Creates a survey owned by `owner`. `title`, `description` are strings, `allow_na
|
||||
* description: string, optional, defaults to "". This is displayed on the front page of the survey
|
||||
* allow_names: boolean, optional, default true. If true, respondents can choose whether to answer with their name recorded. If false, respondents cannot answer with their name recorded.
|
||||
* allow_anonymous: boolean, optional, default true. If true, respondents can choose whether to answer anonymously. If false, respondents cannot answer anonymously.
|
||||
* allow_changes: boolean, optional, default false. If true, the respondent may change his answers anytime before the deadline. If false, the answers are fixed once answered.
|
||||
* allow_changes: boolean, optional, default true. If true, the survey may be altered. If false, the survey and its questions are fixed.
|
||||
* allow_reconsider : boolean, optional, default false. If true, the respondent may change his answers anytime before the deadline. If false, the answers are fixed once answered.
|
||||
* timestamp_start: positive integer, optional, default nil. Timestamp beyond which the survey can be answered.
|
||||
* timestamp_end: positive integer, optional, default nil. Timestamp beyond which the survey can no longer be answered.
|
||||
|
||||
|
2
api.lua
2
api.lua
@ -124,7 +124,7 @@ local function create_survey(owner, title, description, allow_names, allow_anony
|
||||
if (type(allow_anonymous) ~= "boolean") then
|
||||
return false, yl_survey.t("allow_anonymous must be boolean")
|
||||
end
|
||||
if (allow_changes == nil) then allow_changes = false end -- set default
|
||||
if (allow_changes == nil) then allow_changes = true end -- set default
|
||||
if (type(allow_changes) ~= "boolean") then
|
||||
return false, yl_survey.t("allow_changes must be boolean")
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user