Skip to content
GitLab
About GitLab
GitLab: the DevOps platform
Explore GitLab
Install GitLab
How GitLab compares
Get started
GitLab docs
GitLab Learn
Pricing
Talk to an expert
/
Help
What's new
2
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Projects
Groups
Snippets
Sign up now
Login
Sign in / Register
Toggle navigation
Menu
Open sidebar
SondagesPro
SurveyAccess
surveyChaining
Commits
7bde7416
Commit
7bde7416
authored
Jan 24, 2023
by
Chenu Denis
Browse files
[fix] SQL issue with MS in getAnswers, use LS API
parent
bb405f14
Changes
2
Hide whitespace changes
Inline
Side-by-side
config.xml
View file @
7bde7416
...
...
@@ -8,7 +8,7 @@
<author>
Denis Chenu
</author>
<authorUrl>
https://extensions.sondages.pro/
</authorUrl>
<supportUrl>
https://support.sondages.pro/
</supportUrl>
<version>
1.3.
1
</version>
<version>
1.3.
2
</version>
<license>
GNU Affero General Public License v3.0
</license>
<description>
<![CDATA[Chaining one survey with another one.]]>
</description>
</metadata>
...
...
surveyChaining.php
View file @
7bde7416
...
...
@@ -6,7 +6,7 @@
* @copyright 2018-2022 Denis Chenu <http://www.sondages.pro>
* @copyright 2018 DRAAF Bourgogne-Franche-Comte <http://draaf.bourgogne-franche-comte.agriculture.gouv.fr/>
* @license GPL v3
* @version 1.3.
1
* @version 1.3.
2
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
...
...
@@ -325,7 +325,11 @@ class surveyChaining extends PluginBase {
$title
=
$this
->
get
(
'choiceQuestion'
,
'Survey'
,
$surveyId
,
null
);
$oQuestion
=
Question
::
model
()
->
find
(
"sid=:sid and title=:title"
,
array
(
":sid"
=>
$surveyId
,
":title"
=>
$title
));
if
(
$oQuestion
)
{
$answers
=
\
getQuestionInformation\helpers\surveyAnswers
::
getAnswers
(
$oQuestion
,
$oSurvey
->
language
);
if
(
intval
(
App
()
->
getConfig
(
'versionnumber'
)
<=
3
))
{
$answers
=
\
getQuestionInformation\helpers\surveyAnswers
::
getAnswers
(
$oQuestion
);
}
else
{
$answers
=
\
getQuestionInformation\helpers\surveyAnswers
::
getAnswers
(
$oQuestion
,
App
()
->
getLanguage
());
}
foreach
(
$answers
as
$code
=>
$answer
)
{
$aNextSettings
=
array
(
'nextSurvey_'
.
$code
=>
array
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment