Commit 15126365 authored by Chenu Denis's avatar Chenu Denis
Browse files

[fix] Array dual scale broken

[fetaure] Offer API version in App()->getConfig
parent 96319167
......@@ -24,7 +24,7 @@ Class Utilities
/**
* @var float current api version of this file
*/
const API = 0.1;
const API = 0.2;
/**
* @param integer $surveyId
......
......@@ -5,7 +5,7 @@
* @author Denis Chenu <denis@sondages.pro>
* @copyright 2018-2020 Denis Chenu <http://www.sondages.pro>
* @license GPL v3
* @version 1.10.0
* @version 1.11.0
*
* 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
......@@ -25,5 +25,6 @@ class getQuestionInformation extends PluginBase {
public function init() {
Yii::setPathOfAlias(get_class($this), dirname(__FILE__));
App()->setConfig('getQuestionInformationAPI', \getQuestionInformation\Utilities::API);
}
}
......@@ -3,9 +3,9 @@
* An helper to return answer type and list for a survey
*
* @author Denis Chenu <denis@sondages.pro>
* @copyright 2020 Denis Chenu <http://www.sondages.pro>
* @copyright 2020-2021 Denis Chenu <http://www.sondages.pro>
* @license AGPL v3
* @version 0.1.0
* @version 0.1.1
*
* 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
......@@ -209,6 +209,7 @@ class surveyAnswers
}
break;
case 'array-flexible-duel-scale':
case 'array-flexible-dual-scale':
$oSubQuestions = Question::model()->findAll(array(
'select'=>'title,question',
'condition'=>"sid=:sid and language=:language and parent_qid=:qid",
......@@ -401,6 +402,7 @@ class surveyAnswers
case 'array-flexible-row':
case 'array-flexible-column':
case 'array-flexible-duel-scale':
case 'array-flexible-dual-scale':
case 'ranking':
$answers = Answer::model()->findAll(array(
'condition' => "qid=:qid and language=:language and scale_id=:scale",
......
......@@ -3,9 +3,9 @@
* Description
*
* @author Denis Chenu <denis@sondages.pro>
* @copyright 2018-2020 Denis Chenu <http://www.sondages.pro>
* @copyright 2018-2021 Denis Chenu <http://www.sondages.pro>
* @license AGPL v3
* @version 1.1.1
* @version 1.1.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
......@@ -293,6 +293,7 @@ class surveyColumnsInformation
}
break;
case 'array-flexible-duel-scale':
case 'array-flexible-dual-scale':
$oSubQuestions = Question::model()->findAll(array(
'select'=>'title,question',
'condition'=>"sid=:sid and language=:language and parent_qid=:qid",
......@@ -844,6 +845,7 @@ class surveyColumnsInformation
case 'array-flexible-row':
case 'array-flexible-column':
case 'array-flexible-duel-scale':
case 'array-flexible-dual-scale':
case 'ranking':
$answers = Answer::model()->findAll(array(
'condition' => "qid=:qid and language=:language and scale_id=:scale",
......@@ -1138,6 +1140,7 @@ class surveyColumnsInformation
}
break;
case 'array-flexible-duel-scale':
case 'array-flexible-dual-scale': // See https://github.com/LimeSurvey/LimeSurvey/commit/048cfdcbde78b3c60f2188378a36b210df3b24ab
$oSubQuestions = Question::model()->findAll(array(
'select'=>'title,question',
'condition'=>"sid=:sid and language=:language and parent_qid=:qid",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment