ILIAS  Release_4_0_x_branch Revision 61816
 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 ()
 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)
 exportAsXML ()
 loadItem ()
 update ($a_insert_node=false)
 delete ($a_insert_node=false)
 insert ($import=false)

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 39 of file class.ilSCORM2004Objective.php.

Member Function Documentation

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

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

References $ilDB, 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 87 of file class.ilSCORM2004Objective.php.

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

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

References $mappings.

{
}
ilSCORM2004Objective::getMinNormalizedMeasure ( )

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

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

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

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

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

References $primary.

{
}
ilSCORM2004Objective::getSatisfiedByMeasure ( )

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

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

Constructor public.

Definition at line 60 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 162 of file class.ilSCORM2004Objective.php.

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

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

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

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

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

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

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

Definition at line 157 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 137 of file class.ilSCORM2004Objective.php.

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

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

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

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

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

Reimplemented from ilSCORM2004Item.

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

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

Definition at line 172 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 45 of file class.ilSCORM2004Objective.php.

ilSCORM2004Objective::$mappings = array()
private

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

Referenced by getMappings().

ilSCORM2004Objective::$minNormalizedMeasure = 1.0
private

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

ilSCORM2004Objective::$node = null
private

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

ilSCORM2004Objective::$objectiveID = null
private

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

ilSCORM2004Objective::$primary = true
private

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

Referenced by getPrimary().

ilSCORM2004Objective::$satisfiedByMeasure = false
private

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


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