Ejemplo n.º 1
0
 public function on_generate_metadata()
 {
     if (empty($this->qmetadata)) {
         $this->qmetadata = new cc_question_metadata($this->qtype);
         //Get weighting value
         $weighting_value = (int) $this->questions->nodeValue('defaultmark', $this->question_node);
         if ($weighting_value > 1) {
             $this->qmetadata->set_weighting($weighting_value);
         }
         //Get category
         $question_category = $this->questions->nodeValue('../../name', $this->question_node);
         if (!empty($question_category)) {
             $this->qmetadata->set_category($question_category);
         }
         $rts = new cc_assesment_itemmetadata();
         $rts->add_metadata($this->qmetadata);
         $this->qitem->set_itemmetadata($rts);
     }
 }
Ejemplo n.º 2
0
 public function on_generate_metadata()
 {
     if (empty($this->qmetadata)) {
         $this->qmetadata = new cc_question_metadata($this->qtype);
         $rts = new cc_assesment_itemmetadata();
         $rts->add_metadata($this->qmetadata);
         $this->qitem->set_itemmetadata($rts);
     }
 }