/** * 构造方法 * @param string $question 问题 * @param array $choices 选项 * @param mixed $default 默认答案 */ public function __construct($question, array $choices, $default = null) { parent::__construct($question, $default); $this->choices = $choices; $this->setValidator($this->getDefaultValidator()); $this->setAutocompleterValues($choices); }
/** * Constructor */ public function __construct() { //this is highly important parent::__construct(); $this->type = UNIQUE_ANSWER_NO_OPTION; $this->isContent = $this->getIsContent(); }
public function __construct($question, $default = true, $trueAnswerRegex = '/^y/i') { parent::__construct($question, (bool) $default); $this->trueAnswerRegex = $trueAnswerRegex; $this->setNormalizer($this->getDefaultNormalizer()); }
function __construct($question, array $choices, $default = null, $multiSelect = false) { parent::__construct($question, $default); $this->choices = $choices; $this->multiSelect = $multiSelect; $this->setValidator([$this, 'validate']); }
/** * Constructor */ public function __construct() { parent::__construct(); $this->type = MULTIPLE_ANSWER_TRUE_FALSE; $this->isContent = $this->getIsContent(); $this->options = array(1 => 'True', 2 => 'False', 3 => 'DoubtScore'); }
function __construct($question, $default = null, $trueRegex = null) { parent::__construct($question, $default); if (!is_null($trueRegex)) { $this->trueRegex = $trueRegex; } $this->setNormalizer([$this, 'normalize']); }
public function __construct(Registry $Registry, array $a = null) { /** * 3 Lines below to change the database * that's going to be used to the test database * * This in theory is not necessary because boostrap.php * is used in all tests and it defines MONGO_DBNAME as LAMPCMS_TEST * but this is just an extra precaution */ $aMongo = $Registry->Ini->getSection('MONGO'); $aMongo['db'] = 'LAMPCMS_TEST'; $Registry->Ini->setSection('MONGO', $aMongo); $a = \json_decode($this->JSON_ENCODED, true); parent::__construct($Registry, $a); }
public function __construct($question, $default = true) { parent::__construct($question, (bool) $default); $this->setNormalizer($this->getDefaultNormalizer()); }
/** * Constructor */ public function __construct() { parent::__construct(); $this->type = CALCULATED_ANSWER; $this->isContent = $this->getIsContent(); }
/** * Constructor */ public function __construct() { parent::__construct(); $this->type = MATCHING; $this->isContent = $this->getIsContent(); }
/** * Class constructor */ public function __construct() { parent::__construct(); $this->type = DRAGGABLE; $this->isContent = $this->getIsContent(); }
public function __construct() { parent::__construct(); $this->type = HOT_SPOT; }
/** * @param string $question The question text * @param bool $defaultAnswer The default answer to the question */ public function __construct($question, $defaultAnswer = true) { parent::__construct($question, $defaultAnswer); }
public function __construct($xml) { parent::__construct($xml); $attrs = $xml->attributes(); $this->min = $attrs['min']; $this->max = $attrs['max']; }
/** * Constructor */ public function __construct($course_id = null) { $this->rank = self::$_rank++; parent::__construct($course_id); }
/** * Constructor */ public function __construct() { parent::__construct(); $this->type = FILL_IN_BLANKS; $this->isContent = $this->getIsContent(); }
/** * Constructor */ public function __construct() { parent::__construct(); $this->type = MULTIPLE_ANSWER; $this->isContent = $this->getIsContent(); }
/** * Constructor */ public function __construct() { parent::__construct(); $this->type = ORAL_EXPRESSION; $this->isContent = $this->getIsContent(); }