Skip to content

Commit

Permalink
Dev: review comments
Browse files Browse the repository at this point in the history
Dev: and now : ca move some attribute to own plugin
  • Loading branch information
Shnoulle committed Jul 29, 2016
1 parent 12c56b9 commit c9b742d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions application/helpers/questionHelper.php
Expand Up @@ -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()
{
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c9b742d

Please sign in to comment.