Commit
…ot be imported. Dev Question codes must now start with a letter and contain only alphanumeric characters.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -88,6 +88,15 @@ public function rules() | |||||
'message'=>'{attribute} "{value}" is already in use.'), | ||||||
array('language','length', 'min' => 2, 'max'=>20),// in array languages ? | ||||||
array('title,question,help','LSYii_Validators'), | ||||||
array('title', 'unique', 'caseSensitive'=>true, 'criteria'=>array( | ||||||
'condition' => 'language=:language AND sid=:sid', | ||||||
'params' => array( | ||||||
':language' => $this->language, | ||||||
':sid' => $this->sid | ||||||
) | ||||||
), | ||||||
'message' => 'Question codes must be unique.'), | ||||||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
SamMousa
via email
Author
Contributor
|
||||||
array('title', 'match', 'pattern' => '/[a-z,A-Z][[:alnum:]]+/', 'message' => 'Question codes must start with a letter and may only contain alphanumeric characters.'), | ||||||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Shnoulle
Collaborator
|
// Try to fix question title for valid question code enforcement |
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
olleharstedt
Jul 4, 2018
•
edited
Collaborator
edited
Hi Denis, this was mostly a joke. I and Dominik were working with this problem, commited here: 0099036
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
Shnoulle
Jul 4, 2018
Collaborator
The fix is strange, SQ : seems to be Sub Question. But the rules about question not starting with number must be set only for question, not for subquestion :
LimeSurvey/application/models/Question.php
Line 148 in 4dcc3bd
if (!$this->parent_qid) { |
Else : since i see bug fix rehappen after some year, i never sure it's a joke …
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
Shnoulle
Jul 5, 2018
Collaborator
See my comment : https://bugs.limesurvey.org/view.php?id=13845#c48453
can you provide the TSV file ?
I think we must set unique only of there are no parent.
Question and Sub-question have same models, no ?