/** * Create a new AssessmentSection object * * @param string $identifier A QTI Identifier. * @param string $title A Title. * @param boolean $visible If it is visible or not. * @throws \InvalidArgumentException If $identifier is not a valid QTI Identifier, $title is not a string, or visible is not a boolean. */ public function __construct($identifier, $title, $visible) { parent::__construct($identifier); $this->setTitle($title); $this->setVisible($visible); $this->setRubricBlocks(new RubricBlockCollection()); $this->setSectionParts(new SectionPartCollection()); }
/** * Create a new instance of AssessmentItemRef. * * @param string $identifier A QTI Identifier. * @param string $href The URI to refer to the item's file. * @param IdentifierCollection $categories The categories to which the item belongs to. * @throws InvalidArgumentException If $href is not a string. */ public function __construct($identifier, $href, IdentifierCollection $categories = null) { parent::__construct($identifier); $this->setHref($href); if (empty($categories)) { $this->setCategories(new IdentifierCollection()); } else { $this->setCategories($categories); } $this->setVariableMappings(new VariableMappingCollection()); $this->setWeights(new WeightCollection()); $this->setTemplateDefaults(new TemplateDefaultCollection()); }
/** * Create a new instance of AssessmentSectionRef. * * @param string $identifier A QTI Identifier. * @param string $href A URI. * @throws InvalidArgumentException If $identifier is not a valid QTI Identifier. */ public function __construct($identifier, $href) { parent::__construct($identifier); $this->setHref($href); }