From c9b742d773d48c021b4cca8b018805fe6750a8ac Mon Sep 17 00:00:00 2001 From: Denis Chenu Date: Fri, 29 Jul 2016 15:58:16 +0200 Subject: [PATCH] Dev: review comments Dev: and now : ca move some attribute to own plugin --- application/helpers/questionHelper.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/application/helpers/questionHelper.php b/application/helpers/questionHelper.php index c6b626ed7cb..90a0fdc9c54 100644 --- a/application/helpers/questionHelper.php +++ b/application/helpers/questionHelper.php @@ -19,16 +19,16 @@ class questionHelper { /** - * The attribute definition for this LimeSurvey installation + * The question attribute definition for this LimeSurvey installation */ - public static $attributes; + protected static $attributes; /** - * The attribute/settings by question type + * The question attribute (settings) by question type */ - public static $questionAttributesSettings=array(); + protected static $questionAttributesSettings=array(); /** - * Return the definitions of Question attributes core+extended value + * Return all the definitions of Question attributes core+extended value */ public static function getAttributesDefinitions() { @@ -1392,15 +1392,15 @@ public static function getAttributesDefinitions() /** * Return the question attributes definition by question type - * @param $sType: always used except for TSV import : @todo must fix here, but must update to don't get all question type everytime ... : must review the attributeDefinitions - * @return array + * @param $sType: type pof question + * @return array : the attribute settings for this question type */ public static function getQuestionAttributesSettings($sType) { if(!isset(self::$questionAttributesSettings[$sType])) { self::$questionAttributesSettings[$sType]=array(); - self::getAttributesDefinitions(); /* we need to have self::$attributesDefinitions */ + self::getAttributesDefinitions(); /* we need to have self::$attributes */ /* Filter to get this question type setting */ $aQuestionTypeAttribute=array_filter(self::$attributes,function($attribute) use ($sType){ return stripos($attribute['types'],$sType)!==false;