Esempio n. 1
0
 /**
  * add an outcome declaration to the item
  * 
  * @param \oat\taoQtiItem\model\qti\OutcomeDeclaration $outcome
  */
 public function addOutcome(OutcomeDeclaration $outcome)
 {
     $this->outcomes[$outcome->getSerial()] = $outcome;
     $outcome->setRelatedItem($this);
 }
 /**
  * Short description of method buildOutcomeDeclaration
  *
  * @access public
  * @author Joel Bout, <*****@*****.**>
  * @param  DOMElement data
  * @return oat\taoQtiItem\model\qti\OutcomeDeclaration
  */
 protected function buildOutcomeDeclaration(DOMElement $data)
 {
     $outcome = new OutcomeDeclaration($this->extractAttributes($data));
     $data = simplexml_import_dom($data);
     if (isset($data->defaultValue)) {
         if (!is_null($data->defaultValue->value)) {
             $outcome->setDefaultValue((string) $data->defaultValue->value);
         }
     }
     return $outcome;
 }