ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSCORM2004Objective Class Reference

Class ilSCORM2004Objective. More...

+ Inheritance diagram for ilSCORM2004Objective:
+ Collaboration diagram for ilSCORM2004Objective:

Public Member Functions

 ilSCORM2004Objective ($a_treeid=null, $a_obj_id=null)
 Constructor public.
 getId ()
 getMinNormalizedMeasure ()
 getObjectiveID ()
 getPrimary ()
 getSatisfiedByMeasure ()
 getMappings ()
 setSeqNodeId ($a_seqnodeid)
 setId ($a_id)
 setMinNormalizedMeasure ($a_minmeasure)
 setObjectiveID ($a_objectiveid)
 setPrimary ($a_primary)
 setSatisfiedByMeasure ($a_satisfied)
 setMappings ($a_mappings)
 setNode ($a_node)
 setDom ($a_dom)
 updateObjective ()
- Public Member Functions inherited from ilSCORM2004Item
 ilSCORM2004Item ($a_treeid=null, $a_rootlevel=false)
 Constructor public.
 getSeqNodeId ()
 getTreeNodeId ()
 getSequencingId ()
 getImportId ()
 getNocopy ()
 getNodelete ()
 getNomove ()
 getSeqXml ()
 getRoolLevel ()
 getImportSeqXml ()
 Get import seq xml.
 setImportSeqXml ($a_val)
 Set import seq xml.
 setTreeNodeId ($a_tree_node)
 setSequencingId ($a_seq_id)
 setNocopy ($a_nocopy)
 setNodelete ($a_nodelete)
 setNomove ($a_nomove)
 setImportId ($a_importid)
 setSeqXml ($a_seqxml)
 setRootLevel ($a_rootlevel)
 initDom ()
 Init dom.
 exportAsXML ($add_prefix=true)
 Get sequencing information for export (use imsss namespace prefix)
 loadItem ()
 Read data from DB into object.
 update ()
 Update item.
 delete ($a_insert_node=false)
 Delete item.
 insert ($import=false)
 Insert/replace sequencing item in db.

Static Public Member Functions

static fetchAllObjectives ($a_slm_object, $a_tree_node_id)
- Static Public Member Functions inherited from ilSCORM2004Item
static getAllowedActions ($a_node_id)

Private Attributes

 $node = null
 $id = null
 $objectiveID = null
 $minNormalizedMeasure = 1.0
 $primary = true
 $satisfiedByMeasure = false
 $mappings = array()

Additional Inherited Members

- Protected Attributes inherited from ilSCORM2004Item
 $dom = null

Detailed Description

Class ilSCORM2004Objective.

Sequencing Template class for SCORM 2004 Editing

Author
Hendrik Holtmann holtm.nosp@m.ann@.nosp@m.me.co.nosp@m.m
Version
$Id$

Definition at line 19 of file class.ilSCORM2004Objective.php.

Member Function Documentation

static ilSCORM2004Objective::fetchAllObjectives (   $a_slm_object,
  $a_tree_node_id 
)
static

Definition at line 156 of file class.ilSCORM2004Objective.php.

References ilSCORM2004Item\ilSCORM2004Item(), and ilSCORM2004Objective().

Referenced by ilSCORM2004Node\getObjectives().

{
global $ilDB;
$objectives = array();
$seq_item = new ilSCORM2004Item($a_tree_node_id);
$xpath_obj = new DOMXPath($seq_item->dom);
$obj_node_list = $xpath_obj->query('//objective | //primaryObjective');
for ($i=0;$i<$obj_node_list->length;$i++) {
$obj = new ilSCORM2004Objective();
$obj->setNode($obj_node_list->item($i));
$mapping_node_list = $xpath_obj->query('//objective | //primaryObjective');
//check for mapping
array_push($objectives,$obj);
}
return $objectives;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSCORM2004Objective::getId ( )

Definition at line 67 of file class.ilSCORM2004Objective.php.

{
return $this->node->getAttribute("objectiveID");
}
ilSCORM2004Objective::getMappings ( )

Definition at line 92 of file class.ilSCORM2004Objective.php.

References $mappings.

{
}
ilSCORM2004Objective::getMinNormalizedMeasure ( )

Definition at line 72 of file class.ilSCORM2004Objective.php.

{
return $this->node->getAttribute("minNormalizedMeasure");
}
ilSCORM2004Objective::getObjectiveID ( )

Definition at line 77 of file class.ilSCORM2004Objective.php.

{
return $this->node->getAttribute("title");
}
ilSCORM2004Objective::getPrimary ( )

Definition at line 82 of file class.ilSCORM2004Objective.php.

References $primary.

{
}
ilSCORM2004Objective::getSatisfiedByMeasure ( )

Definition at line 87 of file class.ilSCORM2004Objective.php.

{
return $this->node->getAttribute("satisfiedByMeasure");
}
ilSCORM2004Objective::ilSCORM2004Objective (   $a_treeid = null,
  $a_obj_id = null 
)

Constructor public.

Definition at line 40 of file class.ilSCORM2004Objective.php.

References ilSCORM2004Item\ilSCORM2004Item(), and setNode().

Referenced by fetchAllObjectives().

{
if ($a_obj_id !=null && $a_treeid != null) {
$xpath_obj = new DOMXPath($this->dom);
$obj_node_list = $xpath_obj->query('//objective[@objectiveID = "'.$a_obj_id.'"] | '.
'//primaryObjective[@objectiveID = "'.$a_obj_id.'"]');
$this->setNode($obj_node_list->item(0));
} else {
if ($a_obj_id ==null && $a_treeid != null) {
$obj_con = $this->dom->createElement("objectives");
$obj = $this->dom->createElement("primaryObjective");
$root = $this->dom->getElementsByTagName("sequencing")->item(0);
$obj_con->appendChild($obj);
$root->appendChild($obj_con);
$this->node =$this->dom->getElementsByTagName("primaryObjective")->item(0);
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSCORM2004Objective::setDom (   $a_dom)

Reimplemented from ilSCORM2004Item.

Definition at line 142 of file class.ilSCORM2004Objective.php.

{
$this->dom = $a_dom;
}
ilSCORM2004Objective::setId (   $a_id)

Definition at line 106 of file class.ilSCORM2004Objective.php.

{
$this->node->setAttribute("objectiveID",$a_id);
}
ilSCORM2004Objective::setMappings (   $a_mappings)

Definition at line 132 of file class.ilSCORM2004Objective.php.

{
$this->mappings = $a_mappings;
}
ilSCORM2004Objective::setMinNormalizedMeasure (   $a_minmeasure)

Definition at line 112 of file class.ilSCORM2004Objective.php.

{
$this->node->setAttribute("minNormalizedMeasure",$a_minmeasure);
}
ilSCORM2004Objective::setNode (   $a_node)

Definition at line 137 of file class.ilSCORM2004Objective.php.

Referenced by ilSCORM2004Objective().

{
$this->node = $a_node;
}

+ Here is the caller graph for this function:

ilSCORM2004Objective::setObjectiveID (   $a_objectiveid)

Definition at line 117 of file class.ilSCORM2004Objective.php.

{
$this->node->setAttribute("title",$a_objectiveid);
}
ilSCORM2004Objective::setPrimary (   $a_primary)

Definition at line 122 of file class.ilSCORM2004Objective.php.

{
$this->primary = $a_primary;
}
ilSCORM2004Objective::setSatisfiedByMeasure (   $a_satisfied)

Definition at line 127 of file class.ilSCORM2004Objective.php.

{
$this->node->setAttribute("satisfiedByMeasure",$a_satisfied);
}
ilSCORM2004Objective::setSeqNodeId (   $a_seqnodeid)

Reimplemented from ilSCORM2004Item.

Definition at line 101 of file class.ilSCORM2004Objective.php.

{
$this->seqNodeId = $a_seqnodeid;
}
ilSCORM2004Objective::updateObjective ( )

Definition at line 152 of file class.ilSCORM2004Objective.php.

References ilSCORM2004Item\update().

+ Here is the call graph for this function:

Field Documentation

ilSCORM2004Objective::$id = null
private

Definition at line 25 of file class.ilSCORM2004Objective.php.

ilSCORM2004Objective::$mappings = array()
private

Definition at line 34 of file class.ilSCORM2004Objective.php.

Referenced by getMappings().

ilSCORM2004Objective::$minNormalizedMeasure = 1.0
private

Definition at line 29 of file class.ilSCORM2004Objective.php.

ilSCORM2004Objective::$node = null
private

Definition at line 24 of file class.ilSCORM2004Objective.php.

ilSCORM2004Objective::$objectiveID = null
private

Definition at line 26 of file class.ilSCORM2004Objective.php.

ilSCORM2004Objective::$primary = true
private

Definition at line 30 of file class.ilSCORM2004Objective.php.

Referenced by getPrimary().

ilSCORM2004Objective::$satisfiedByMeasure = false
private

Definition at line 31 of file class.ilSCORM2004Objective.php.


The documentation for this class was generated from the following file: