* @package taoQTI * @see http://www.imsglobal.org/question/qtiv2p1/imsqti_infov2p1.html#element10252 */ class RubricBlock extends Element implements FlowContainer, ContentVariable { /** * the QTI tag name as defined in QTI standard * * @access protected * @var string */ protected static $qtiTagName = 'rubricBlock'; /** * The content body of the rubric block * * @var oat\taoQtiItem\model\qti\container\ContainerStatic */ protected $body = null; public function __construct($attributes = [], Item $relatedItem = null, $serial = '') { parent::__construct($attributes, $relatedItem, $serial); $this->body = new ContainerStatic(); } public function getBody() { return $this->body; } protected function getUsedAttributes() { return [ 'oat\\taoQtiItem\\model\\qti\\attribute\\View', //@todo: the cardinality actually is [0..*], make it this way! 'oat\\taoQtiItem\\model\\qti\\attribute\\UseAttribute' ]; } public function toArray($filterVariableContent = false, &$filtered = []) { $data = parent::toArray($filterVariableContent, $filtered); if ($filterVariableContent) { $filtered[$this->getSerial()] = $data; $data = [ 'serial' => $data['serial'], 'qtiClass' => $data['qtiClass'] ]; } return $data; } public function toFilteredArray() { return $this->toArray(true); } }