ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilSCORM2004Objective Class Reference

Class ilSCORM2004Objective. More...

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

Public Member Functions

 __construct ($a_treeid=null, $a_obj_id=null)
 Constructor public. More...
 
 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
 __construct ($a_treeid=null, $a_rootlevel=false)
 Constructor public. More...
 
 getSeqNodeId ()
 
 getTreeNodeId ()
 
 getSequencingId ()
 
 getImportId ()
 
 getNocopy ()
 
 getNodelete ()
 
 getNomove ()
 
 getSeqXml ()
 
 getRoolLevel ()
 
 getImportSeqXml ()
 Get import seq xml. More...
 
 setImportSeqXml ($a_val)
 Set import seq xml. More...
 
 setSeqNodeId ($a_seqnodeid)
 
 setTreeNodeId ($a_tree_node)
 
 setSequencingId ($a_seq_id)
 
 setNocopy ($a_nocopy)
 
 setNodelete ($a_nodelete)
 
 setNomove ($a_nomove)
 
 setImportId ($a_importid)
 
 setSeqXml ($a_seqxml)
 
 setDom ($a_dom)
 
 setRootLevel ($a_rootlevel)
 
 initDom ()
 Init dom. More...
 
 setDefaultXml ($a_def_control_mode=false)
 Set default xml. More...
 
 exportAsXML ($add_prefix=true)
 Get sequencing information for export (use imsss namespace prefix) More...
 
 loadItem ()
 Read data from DB into object. More...
 
 update ()
 Update item. More...
 
 delete ($a_insert_node=false)
 Delete item. More...
 
 insert ($import=false)
 Insert/replace sequencing item in db. More...
 

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
 
 $log
 

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.

Constructor & Destructor Documentation

◆ __construct()

ilSCORM2004Objective::__construct (   $a_treeid = null,
  $a_obj_id = null 
)

Constructor public.

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

References setNode().

41  {
42  parent::__construct($a_treeid);
43 
44  if ($a_obj_id !=null && $a_treeid != null) {
45  $xpath_obj = new DOMXPath($this->dom);
46  $obj_node_list = $xpath_obj->query('//objective[@objectiveID = "'.$a_obj_id.'"] | '.
47  '//primaryObjective[@objectiveID = "'.$a_obj_id.'"]');
48  $this->setNode($obj_node_list->item(0));
49  } else {
50  if ($a_obj_id ==null && $a_treeid != null) {
51  $obj_con = $this->dom->createElement("objectives");
52  $obj = $this->dom->createElement("primaryObjective");
53  $root = $this->dom->getElementsByTagName("sequencing")->item(0);
54  $obj_con->appendChild($obj);
55  $root->appendChild($obj_con);
56  $this->node =$this->dom->getElementsByTagName("primaryObjective")->item(0);
57  }
58  }
59  }
+ Here is the call graph for this function:

Member Function Documentation

◆ fetchAllObjectives()

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

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

References $ilDB, and array.

Referenced by ilSCORM2004Node\getObjectives().

157  {
158  global $ilDB;
159 
160  $objectives = array();
161  $seq_item = new ilSCORM2004Item($a_tree_node_id);
162  $xpath_obj = new DOMXPath($seq_item->dom);
163  $obj_node_list = $xpath_obj->query('//objective | //primaryObjective');
164  for ($i=0;$i<$obj_node_list->length;$i++) {
165  $obj = new ilSCORM2004Objective();
166  $obj->setNode($obj_node_list->item($i));
167  $mapping_node_list = $xpath_obj->query('//objective | //primaryObjective');
168  //check for mapping
169  array_push($objectives,$obj);
170  }
171  return $objectives;
172 
173  }
Class ilSCORM2004Condition.
Create styles array
The data for the language used.
global $ilDB
Class ilSCORM2004Objective.
+ Here is the caller graph for this function:

◆ getId()

ilSCORM2004Objective::getId ( )

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

68  {
69  return $this->node->getAttribute("objectiveID");
70  }

◆ getMappings()

ilSCORM2004Objective::getMappings ( )

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

References $mappings.

◆ getMinNormalizedMeasure()

ilSCORM2004Objective::getMinNormalizedMeasure ( )

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

73  {
74  return $this->node->getAttribute("minNormalizedMeasure");
75  }

◆ getObjectiveID()

ilSCORM2004Objective::getObjectiveID ( )

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

78  {
79  return $this->node->getAttribute("title");
80  }

◆ getPrimary()

ilSCORM2004Objective::getPrimary ( )

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

References $primary.

◆ getSatisfiedByMeasure()

ilSCORM2004Objective::getSatisfiedByMeasure ( )

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

88  {
89  return $this->node->getAttribute("satisfiedByMeasure");
90  }

◆ setDom()

ilSCORM2004Objective::setDom (   $a_dom)

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

143  {
144  $this->dom = $a_dom;
145  }

◆ setId()

ilSCORM2004Objective::setId (   $a_id)

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

107  {
108  $this->node->setAttribute("objectiveID",$a_id);
109  }

◆ setMappings()

ilSCORM2004Objective::setMappings (   $a_mappings)

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

133  {
134  $this->mappings = $a_mappings;
135  }

◆ setMinNormalizedMeasure()

ilSCORM2004Objective::setMinNormalizedMeasure (   $a_minmeasure)

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

113  {
114  $this->node->setAttribute("minNormalizedMeasure",$a_minmeasure);
115  }

◆ setNode()

ilSCORM2004Objective::setNode (   $a_node)

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

Referenced by __construct().

138  {
139  $this->node = $a_node;
140  }
+ Here is the caller graph for this function:

◆ setObjectiveID()

ilSCORM2004Objective::setObjectiveID (   $a_objectiveid)

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

118  {
119  $this->node->setAttribute("title",$a_objectiveid);
120  }

◆ setPrimary()

ilSCORM2004Objective::setPrimary (   $a_primary)

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

123  {
124  $this->primary = $a_primary;
125  }

◆ setSatisfiedByMeasure()

ilSCORM2004Objective::setSatisfiedByMeasure (   $a_satisfied)

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

128  {
129  $this->node->setAttribute("satisfiedByMeasure",$a_satisfied);
130  }

◆ setSeqNodeId()

ilSCORM2004Objective::setSeqNodeId (   $a_seqnodeid)

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

102  {
103  $this->seqNodeId = $a_seqnodeid;
104  }

◆ updateObjective()

ilSCORM2004Objective::updateObjective ( )

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

152  {
153  parent::update();
154  }

Field Documentation

◆ $id

ilSCORM2004Objective::$id = null
private

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

◆ $mappings

ilSCORM2004Objective::$mappings =array()
private

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

Referenced by getMappings().

◆ $minNormalizedMeasure

ilSCORM2004Objective::$minNormalizedMeasure = 1.0
private

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

◆ $node

ilSCORM2004Objective::$node = null
private

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

◆ $objectiveID

ilSCORM2004Objective::$objectiveID = null
private

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

◆ $primary

ilSCORM2004Objective::$primary = true
private

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

Referenced by getPrimary().

◆ $satisfiedByMeasure

ilSCORM2004Objective::$satisfiedByMeasure = false
private

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


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