LimeSurvey: master 16425fff

Author Committer Branch Timestamp Parent
gabrieljenik GitHub master 2020-08-12 17:50:51 master b2c63ba5
Affected Issues  16469: Any admin user can see any question (without read right on survey)
 16563: We cannot create a new question and Limesurvey deletes some answers
 16566: We cannot create multiple choice questions
Changeset

Fixed issue 16566: We cannot create multiple choice questions (#1543)

Dev: Before issue 16469, QuestionEditorController tried to find the questions using 'findByPk', which automatically casts the value to int. Now, 'find' is used because the survey ID, as the search is done by multiple criterias.
Dev: When saving a new question, 'qid' is an empty string, and the resulting SQL fails in Postgres because of the data type. Solved by casting 'qid' to int.
Dev: This also helps with issue 16563.
Dev: Casting subquestion id as to remove the random characters vue id adds for its view.

mod - application/controllers/QuestionEditorController.php Diff File