/** * Create a new TextEntryInteraction object. * * @param string $responseIdentifier * @param string $id The id of the bodyElement. * @param string $class The class of the bodyElement. * @param string $lang The language of the bodyElement. * @param string $label The label of the bodyElement. * @throws \InvalidArgumentException If any of the arguments is invalid. */ public function __construct($responseIdentifier, $id = '', $class = '', $lang = '', $label = '') { parent::__construct($responseIdentifier, $id, $class, $lang, $label); $this->setBase(10); $this->setStringIdentifier(''); $this->setExpectedLength(-1); $this->setPatternMask(''); $this->setPlaceholderText(''); }
/** * * @param string $responseIdentifier The identifier of the associated response variable. * @param string $title The title to be displayed to the candidate as a prompt for ending the attempt. * @param string $id The id of the bodyElement. * @param string $class The class of the bodyElement. * @param string $lang The language of the bodyElement. * @param string $label The label of the bodyElement. * @throws \InvalidArgumentException If any of the argument is invalid. */ public function __construct($responseIdentifier, $title, $id = '', $class = '', $lang = '', $label = '') { parent::__construct($responseIdentifier, $id, $class, $lang, $label); $this->setTitle($title); }
/** * Create a new InlineChoiceInteraction object. * * @param string $responseIdentifier The identifier of the associated response variable. * @param \qtism\data\content\interactions\InlineChoiceCollection $content The InlineChoice objects composing the interaction. * @param string $id The id of the bodyElement. * @param string $class The class of the bodyElement. * @param string $lang The language of the bodyElement. * @param string $label The label of the bodyElement. * @throws \InvalidArgumentException If any of the arguments is invalid. */ public function __construct($responseIdentifier, InlineChoiceCollection $content, $id = '', $class = '', $lang = '', $label = '') { parent::__construct($responseIdentifier, $id, $class, $lang, $label); $this->setContent($content); $this->setShuffle(false); $this->setRequired(false); }